Skip to content

validate_e911_address async

validate_e911_address(
    aws_account_id: NonEmptyString,
    street_number: SensitiveNonEmptyString,
    street_info: SensitiveNonEmptyString,
    city: SensitiveNonEmptyString,
    state: SensitiveNonEmptyString,
    country: SensitiveNonEmptyString,
    postal_code: SensitiveNonEmptyString,
    *,
    config_overrides: Optional[AsyncChimeSDKVoiceClientConfig] = None,
) -> ValidateE911AddressResponse

Validates an address to be used for 911 calls made with Amazon Chime SDK Voice Connectors. You can use validated addresses in a Presence Information Data Format Location Object file that you include in SIP requests. That helps ensure that addresses are routed to the appropriate Public Safety Answering Point.

Parameters:

Raises:

Source code in docs_src/capo_chime_sdk_voice/_services/async_chime_sdk_voice.py
async def validate_e911_address(
    self,
    aws_account_id: "capo_chime_sdk_voice.types.non_empty_string.NonEmptyString",
    street_number: "capo_chime_sdk_voice.types.sensitive_non_empty_string.SensitiveNonEmptyString",
    street_info: "capo_chime_sdk_voice.types.sensitive_non_empty_string.SensitiveNonEmptyString",
    city: "capo_chime_sdk_voice.types.sensitive_non_empty_string.SensitiveNonEmptyString",
    state: "capo_chime_sdk_voice.types.sensitive_non_empty_string.SensitiveNonEmptyString",
    country: "capo_chime_sdk_voice.types.sensitive_non_empty_string.SensitiveNonEmptyString",
    postal_code: "capo_chime_sdk_voice.types.sensitive_non_empty_string.SensitiveNonEmptyString",
    *,
    config_overrides: Optional[AsyncChimeSDKVoiceClientConfig] = None,
) -> "capo_chime_sdk_voice.types.validate_e911_address_response.ValidateE911AddressResponse":
    """<p>Validates an address to be used for 911 calls made with Amazon Chime SDK Voice Connectors. You can use validated addresses in a Presence Information Data Format Location Object file that you include in SIP requests. That helps ensure that addresses are routed to the appropriate Public Safety Answering Point.</p>

    Args:
        aws_account_id: <p>The AWS account ID.</p>
        street_number: <p>The address street number, such as <code>200</code> or <code>2121</code>.</p>
        street_info: <p>The address street information, such as <code>8th Avenue</code>.</p>
        city: <p>The address city, such as <code>Portland</code>.</p>
        state: <p>The address state, such as <code>ME</code>.</p>
        country: <p>The country in the address being validated as two-letter country code in ISO 3166-1 alpha-2 format, such as <code>US</code>. For more information, see <a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO 3166-1 alpha-2</a> in Wikipedia.</p>
        postal_code: <p>The dress postal code, such <code>04352</code>.</p>

    Raises:
        capo_chime_sdk_voice.errors.access_denied_exception.AccessDeniedException: <p>You don't have the permissions needed to run this action.</p>
        capo_chime_sdk_voice.errors.bad_request_exception.BadRequestException: <p>The input parameters don't match the service's restrictions.</p>
        capo_chime_sdk_voice.errors.forbidden_exception.ForbiddenException: <p>The client is permanently forbidden from making the request.</p>
        capo_chime_sdk_voice.errors.not_found_exception.NotFoundException: <p>The requested resource couldn't be found.</p>
        capo_chime_sdk_voice.errors.service_failure_exception.ServiceFailureException: <p>The service encountered an unexpected error.</p>
        capo_chime_sdk_voice.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service is currently unavailable.</p>
        capo_chime_sdk_voice.errors.throttled_client_exception.ThrottledClientException: <p>The number of customer requests exceeds the request rate limit.</p>
        capo_chime_sdk_voice.errors.unauthorized_client_exception.UnauthorizedClientException: <p>The client isn't authorized to request a resource.</p>
        capo_chime_sdk_voice.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_chime_sdk_voice.types.validate_e911_address_request.ValidateE911AddressRequest]",
    ) -> AsyncOperationResponse[
        "capo_chime_sdk_voice.types.validate_e911_address_response.ValidateE911AddressResponse"
    ]:
        import capo_chime_sdk_voice._operations.chime_sdk_telephony_service.validate_e911_address

        (
            output,
            http_response,
        ) = await capo_chime_sdk_voice._operations.chime_sdk_telephony_service.validate_e911_address.async_validate_e911_address(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_chime_sdk_voice.types.validate_e911_address_request.ValidateE911AddressRequest",
    ) -> dict[str, Any]:
        import capo_chime_sdk_voice.types.validate_e911_address_request

        return capo_chime_sdk_voice.types.validate_e911_address_request.redact_sensitive(
            input_
        )

    def _redact_output(
        output: "capo_chime_sdk_voice.types.validate_e911_address_response.ValidateE911AddressResponse",
    ) -> dict[str, Any]:
        import capo_chime_sdk_voice.types.validate_e911_address_response

        return capo_chime_sdk_voice.types.validate_e911_address_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "ValidateE911Address",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_chime_sdk_voice.types.validate_e911_address_request.ValidateE911AddressRequest = {
        "aws_account_id": aws_account_id,
        "street_number": street_number,
        "street_info": street_info,
        "city": city,
        "state": state,
        "country": country,
        "postal_code": postal_code,
    }

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