Skip to content

get_member_of_address_list async

get_member_of_address_list(
    address_list_id: AddressListId,
    address: Address,
    *,
    config_overrides: Optional[AsyncMailManagerClientConfig] = None,
) -> GetMemberOfAddressListResponse

Fetch attributes of a member in an address list.

Parameters:

  • address_list_id (AddressListId) –

    The unique identifier of the address list to retrieve the address from.

  • address (Address) –

    The address to be retrieved from the address list.

Raises:

Source code in docs_src/capo_mailmanager/_services/async_mail_manager.py
async def get_member_of_address_list(
    self,
    address_list_id: "capo_mailmanager.types.address_list_id.AddressListId",
    address: "capo_mailmanager.types.address.Address",
    *,
    config_overrides: Optional[AsyncMailManagerClientConfig] = None,
) -> "capo_mailmanager.types.get_member_of_address_list_response.GetMemberOfAddressListResponse":
    """<p>Fetch attributes of a member in an address list.</p>

    Args:
        address_list_id: <p>The unique identifier of the address list to retrieve the address from.</p>
        address: <p>The address to be retrieved from the address list.</p>

    Raises:
        capo_mailmanager.errors.access_denied_exception.AccessDeniedException: <p>Occurs when a user is denied access to a specific resource or action.</p>
        capo_mailmanager.errors.resource_not_found_exception.ResourceNotFoundException: <p>Occurs when a requested resource is not found.</p>
        capo_mailmanager.errors.throttling_exception.ThrottlingException: <p>Occurs when a service's request rate limit is exceeded, resulting in throttling of further requests.</p>
        capo_mailmanager.errors.validation_exception.ValidationException: <p>The request validation has failed. For details, see the accompanying error message.</p>
        capo_mailmanager.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_mailmanager.types.get_member_of_address_list_request.GetMemberOfAddressListRequest]",
    ) -> AsyncOperationResponse[
        "capo_mailmanager.types.get_member_of_address_list_response.GetMemberOfAddressListResponse"
    ]:
        import capo_mailmanager._operations.mail_manager_svc.get_member_of_address_list

        (
            output,
            http_response,
        ) = await capo_mailmanager._operations.mail_manager_svc.get_member_of_address_list.async_get_member_of_address_list(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_mailmanager.types.get_member_of_address_list_request.GetMemberOfAddressListRequest",
    ) -> dict[str, Any]:
        import capo_mailmanager.types.get_member_of_address_list_request

        return capo_mailmanager.types.get_member_of_address_list_request.redact_sensitive(
            input_
        )

    def _redact_output(
        output: "capo_mailmanager.types.get_member_of_address_list_response.GetMemberOfAddressListResponse",
    ) -> dict[str, Any]:
        import capo_mailmanager.types.get_member_of_address_list_response

        return capo_mailmanager.types.get_member_of_address_list_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "GetMemberOfAddressList",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_mailmanager.types.get_member_of_address_list_request.GetMemberOfAddressListRequest = {
        "address_list_id": address_list_id,
        "address": address,
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output