#[non_exhaustive]
pub struct RejectEnvironmentAccountConnectionError { pub kind: RejectEnvironmentAccountConnectionErrorKind, /* private fields */ }
Expand description

Error type for the RejectEnvironmentAccountConnection operation.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§kind: RejectEnvironmentAccountConnectionErrorKind

Kind of error that occurred.

Implementations§

Creates a new RejectEnvironmentAccountConnectionError.

Creates the RejectEnvironmentAccountConnectionError::Unhandled variant from any error type.

Examples found in repository?
src/operation_deser.rs (line 7984)
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
pub fn parse_reject_environment_account_connection_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::RejectEnvironmentAccountConnectionOutput,
    crate::error::RejectEnvironmentAccountConnectionError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::RejectEnvironmentAccountConnectionError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => {
            return Err(crate::error::RejectEnvironmentAccountConnectionError::unhandled(generic))
        }
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "AccessDeniedException" => crate::error::RejectEnvironmentAccountConnectionError {
            meta: generic,
            kind: crate::error::RejectEnvironmentAccountConnectionErrorKind::AccessDeniedException(
                {
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::access_denied_exception::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_access_denied_exception_json_err(response.body().as_ref(), output).map_err(crate::error::RejectEnvironmentAccountConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                },
            ),
        },
        "ConflictException" => {
            crate::error::RejectEnvironmentAccountConnectionError {
                meta: generic,
                kind: crate::error::RejectEnvironmentAccountConnectionErrorKind::ConflictException(
                    {
                        #[allow(unused_mut)]
                        let mut tmp = {
                            #[allow(unused_mut)]
                            let mut output = crate::error::conflict_exception::Builder::default();
                            let _ = response;
                            output = crate::json_deser::deser_structure_crate_error_conflict_exception_json_err(response.body().as_ref(), output).map_err(crate::error::RejectEnvironmentAccountConnectionError::unhandled)?;
                            output.build()
                        };
                        if tmp.message.is_none() {
                            tmp.message = _error_message;
                        }
                        tmp
                    },
                ),
            }
        }
        "InternalServerException" => crate::error::RejectEnvironmentAccountConnectionError {
            meta: generic,
            kind:
                crate::error::RejectEnvironmentAccountConnectionErrorKind::InternalServerException(
                    {
                        #[allow(unused_mut)]
                        let mut tmp = {
                            #[allow(unused_mut)]
                            let mut output =
                                crate::error::internal_server_exception::Builder::default();
                            let _ = response;
                            output = crate::json_deser::deser_structure_crate_error_internal_server_exception_json_err(response.body().as_ref(), output).map_err(crate::error::RejectEnvironmentAccountConnectionError::unhandled)?;
                            output.build()
                        };
                        if tmp.message.is_none() {
                            tmp.message = _error_message;
                        }
                        tmp
                    },
                ),
        },
        "ResourceNotFoundException" => crate::error::RejectEnvironmentAccountConnectionError {
            meta: generic,
            kind:
                crate::error::RejectEnvironmentAccountConnectionErrorKind::ResourceNotFoundException(
                    {
                        #[allow(unused_mut)]
                        let mut tmp = {
                            #[allow(unused_mut)]
                            let mut output =
                                crate::error::resource_not_found_exception::Builder::default();
                            let _ = response;
                            output = crate::json_deser::deser_structure_crate_error_resource_not_found_exception_json_err(response.body().as_ref(), output).map_err(crate::error::RejectEnvironmentAccountConnectionError::unhandled)?;
                            output.build()
                        };
                        if tmp.message.is_none() {
                            tmp.message = _error_message;
                        }
                        tmp
                    },
                ),
        },
        "ThrottlingException" => crate::error::RejectEnvironmentAccountConnectionError {
            meta: generic,
            kind: crate::error::RejectEnvironmentAccountConnectionErrorKind::ThrottlingException({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::throttling_exception::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_throttling_exception_json_err(response.body().as_ref(), output).map_err(crate::error::RejectEnvironmentAccountConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ValidationException" => crate::error::RejectEnvironmentAccountConnectionError {
            meta: generic,
            kind: crate::error::RejectEnvironmentAccountConnectionErrorKind::ValidationException({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::validation_exception::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_validation_exception_json_err(response.body().as_ref(), output).map_err(crate::error::RejectEnvironmentAccountConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        _ => crate::error::RejectEnvironmentAccountConnectionError::generic(generic),
    })
}

Creates the RejectEnvironmentAccountConnectionError::Unhandled variant from a aws_smithy_types::Error.

Examples found in repository?
src/operation_deser.rs (line 8106)
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
pub fn parse_reject_environment_account_connection_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::RejectEnvironmentAccountConnectionOutput,
    crate::error::RejectEnvironmentAccountConnectionError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::RejectEnvironmentAccountConnectionError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => {
            return Err(crate::error::RejectEnvironmentAccountConnectionError::unhandled(generic))
        }
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "AccessDeniedException" => crate::error::RejectEnvironmentAccountConnectionError {
            meta: generic,
            kind: crate::error::RejectEnvironmentAccountConnectionErrorKind::AccessDeniedException(
                {
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::access_denied_exception::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_access_denied_exception_json_err(response.body().as_ref(), output).map_err(crate::error::RejectEnvironmentAccountConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                },
            ),
        },
        "ConflictException" => {
            crate::error::RejectEnvironmentAccountConnectionError {
                meta: generic,
                kind: crate::error::RejectEnvironmentAccountConnectionErrorKind::ConflictException(
                    {
                        #[allow(unused_mut)]
                        let mut tmp = {
                            #[allow(unused_mut)]
                            let mut output = crate::error::conflict_exception::Builder::default();
                            let _ = response;
                            output = crate::json_deser::deser_structure_crate_error_conflict_exception_json_err(response.body().as_ref(), output).map_err(crate::error::RejectEnvironmentAccountConnectionError::unhandled)?;
                            output.build()
                        };
                        if tmp.message.is_none() {
                            tmp.message = _error_message;
                        }
                        tmp
                    },
                ),
            }
        }
        "InternalServerException" => crate::error::RejectEnvironmentAccountConnectionError {
            meta: generic,
            kind:
                crate::error::RejectEnvironmentAccountConnectionErrorKind::InternalServerException(
                    {
                        #[allow(unused_mut)]
                        let mut tmp = {
                            #[allow(unused_mut)]
                            let mut output =
                                crate::error::internal_server_exception::Builder::default();
                            let _ = response;
                            output = crate::json_deser::deser_structure_crate_error_internal_server_exception_json_err(response.body().as_ref(), output).map_err(crate::error::RejectEnvironmentAccountConnectionError::unhandled)?;
                            output.build()
                        };
                        if tmp.message.is_none() {
                            tmp.message = _error_message;
                        }
                        tmp
                    },
                ),
        },
        "ResourceNotFoundException" => crate::error::RejectEnvironmentAccountConnectionError {
            meta: generic,
            kind:
                crate::error::RejectEnvironmentAccountConnectionErrorKind::ResourceNotFoundException(
                    {
                        #[allow(unused_mut)]
                        let mut tmp = {
                            #[allow(unused_mut)]
                            let mut output =
                                crate::error::resource_not_found_exception::Builder::default();
                            let _ = response;
                            output = crate::json_deser::deser_structure_crate_error_resource_not_found_exception_json_err(response.body().as_ref(), output).map_err(crate::error::RejectEnvironmentAccountConnectionError::unhandled)?;
                            output.build()
                        };
                        if tmp.message.is_none() {
                            tmp.message = _error_message;
                        }
                        tmp
                    },
                ),
        },
        "ThrottlingException" => crate::error::RejectEnvironmentAccountConnectionError {
            meta: generic,
            kind: crate::error::RejectEnvironmentAccountConnectionErrorKind::ThrottlingException({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::throttling_exception::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_throttling_exception_json_err(response.body().as_ref(), output).map_err(crate::error::RejectEnvironmentAccountConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ValidationException" => crate::error::RejectEnvironmentAccountConnectionError {
            meta: generic,
            kind: crate::error::RejectEnvironmentAccountConnectionErrorKind::ValidationException({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::validation_exception::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_validation_exception_json_err(response.body().as_ref(), output).map_err(crate::error::RejectEnvironmentAccountConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        _ => crate::error::RejectEnvironmentAccountConnectionError::generic(generic),
    })
}

Returns the error message if one is available.

Returns error metadata, which includes the error code, message, request ID, and potentially additional information.

Returns the request ID if it’s available.

Returns the error code if it’s available.

Examples found in repository?
src/error.rs (line 10897)
10896
10897
10898
    fn code(&self) -> Option<&str> {
        RejectEnvironmentAccountConnectionError::code(self)
    }

Returns true if the error kind is RejectEnvironmentAccountConnectionErrorKind::AccessDeniedException.

Returns true if the error kind is RejectEnvironmentAccountConnectionErrorKind::ConflictException.

Returns true if the error kind is RejectEnvironmentAccountConnectionErrorKind::InternalServerException.

Returns true if the error kind is RejectEnvironmentAccountConnectionErrorKind::ResourceNotFoundException.

Returns true if the error kind is RejectEnvironmentAccountConnectionErrorKind::ThrottlingException.

Returns true if the error kind is RejectEnvironmentAccountConnectionErrorKind::ValidationException.

Trait Implementations§

Creates an unhandled error variant with the given source.
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
The lower-level source of this error, if any. Read more
👎Deprecated since 1.42.0: use the Display impl or to_string()
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
Converts to this type from the input type.
Returns the code for this error if one exists
Returns the ErrorKind when the error is modeled as retryable Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to provide by using demand. Read more
Should always be Self
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more