Skip to content

activate_contact_channel async

activate_contact_channel(
    contact_channel_id: SsmContactsArn,
    activation_code: ActivationCode,
    *,
    config_overrides: Optional[AsyncSSMContactsClientConfig] = None,
) -> ActivateContactChannelResult

Activates a contact's contact channel. Incident Manager can't engage a contact until the contact channel has been activated.

Parameters:

  • contact_channel_id (SsmContactsArn) –

    The Amazon Resource Name (ARN) of the contact channel.

  • activation_code (ActivationCode) –

    The code sent to the contact channel when it was created in the contact.

Raises:

Source code in docs_src/capo_ssm_contacts/_services/async_ssm_contacts.py
async def activate_contact_channel(
    self,
    contact_channel_id: "capo_ssm_contacts.types.ssm_contacts_arn.SsmContactsArn",
    activation_code: "capo_ssm_contacts.types.activation_code.ActivationCode",
    *,
    config_overrides: Optional[AsyncSSMContactsClientConfig] = None,
) -> "capo_ssm_contacts.types.activate_contact_channel_result.ActivateContactChannelResult":
    """<p>Activates a contact's contact channel. Incident Manager can't engage a contact until the contact channel has been activated.</p>

    Args:
        contact_channel_id: <p>The Amazon Resource Name (ARN) of the contact channel.</p>
        activation_code: <p>The code sent to the contact channel when it was created in the contact.</p>

    Raises:
        capo_ssm_contacts.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this operation.</p>
        capo_ssm_contacts.errors.internal_server_exception.InternalServerException: <p>Unexpected error occurred while processing the request.</p>
        capo_ssm_contacts.errors.resource_not_found_exception.ResourceNotFoundException: <p>Request references a resource that doesn't exist.</p>
        capo_ssm_contacts.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_ssm_contacts.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_ssm_contacts.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ssm_contacts.types.activate_contact_channel_request.ActivateContactChannelRequest]",
    ) -> AsyncOperationResponse[
        "capo_ssm_contacts.types.activate_contact_channel_result.ActivateContactChannelResult"
    ]:
        import capo_ssm_contacts._operations.ssm_contacts.activate_contact_channel

        (
            output,
            http_response,
        ) = await capo_ssm_contacts._operations.ssm_contacts.activate_contact_channel.async_activate_contact_channel(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ActivateContactChannel")
    )
    input_: capo_ssm_contacts.types.activate_contact_channel_request.ActivateContactChannelRequest = {
        "contact_channel_id": contact_channel_id,
        "activation_code": activation_code,
    }

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