Skip to content

disassociate_from_configuration

disassociate_from_configuration(
    resource: ResourceIdentifier,
    chat_configuration: ChatConfigurationArn,
    *,
    config_overrides: Optional[chatbotClientConfig] = None,
) -> DisassociateFromConfigurationResult

Unlink a resource, for example a custom action, from a channel configuration.

Parameters:

  • resource (ResourceIdentifier) –

    The resource (for example, a custom action) Amazon Resource Name (ARN) to unlink.

  • chat_configuration (ChatConfigurationArn) –

    The channel configuration the resource is being disassociated from.

Raises:

Examples:

Disassociate a custom action from a configuration

>>> client.disassociate_from_configuration(resource='arn:aws:chatbot::1234567890:custom-action/my-custom-action', chat_configuration='arn:aws:chatbot::1234567890:chat-configuration/slack-channel/my-channel')
Source code in docs_src/capo_chatbot/_services/chatbot.py
def disassociate_from_configuration(
    self,
    resource: "capo_chatbot.types.resource_identifier.ResourceIdentifier",
    chat_configuration: "capo_chatbot.types.chat_configuration_arn.ChatConfigurationArn",
    *,
    config_overrides: Optional[chatbotClientConfig] = None,
) -> "capo_chatbot.types.disassociate_from_configuration_result.DisassociateFromConfigurationResult":
    """<p>Unlink a resource, for example a custom action, from a channel configuration.</p>

    Args:
        resource: <p>The resource (for example, a custom action) Amazon Resource Name (ARN) to unlink.</p>
        chat_configuration: <p>The channel configuration the resource is being disassociated from.</p>

    Raises:
        capo_chatbot.errors.internal_service_error.InternalServiceError: <p>Unexpected error during processing of request.</p>
        capo_chatbot.errors.invalid_request_exception.InvalidRequestException: <p>Your request input doesn't meet the constraints required by AWS Chatbot.</p>
        capo_chatbot.errors.unauthorized_exception.UnauthorizedException: <p>The request was rejected because it doesn't have valid credentials for the target resource.</p>
        capo_chatbot.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Disassociate a custom action from a configuration

        >>> client.disassociate_from_configuration(resource='arn:aws:chatbot::1234567890:custom-action/my-custom-action', chat_configuration='arn:aws:chatbot::1234567890:chat-configuration/slack-channel/my-channel')
    """

    def _handler(
        req: "OperationRequest[capo_chatbot.types.disassociate_from_configuration_request.DisassociateFromConfigurationRequest]",
    ) -> OperationResponse[
        "capo_chatbot.types.disassociate_from_configuration_result.DisassociateFromConfigurationResult"
    ]:
        import capo_chatbot._operations.wheatley_orchestration_20171011.disassociate_from_configuration

        output, http_response = (
            capo_chatbot._operations.wheatley_orchestration_20171011.disassociate_from_configuration.disassociate_from_configuration(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DisassociateFromConfiguration")
    )
    input_: capo_chatbot.types.disassociate_from_configuration_request.DisassociateFromConfigurationRequest = {
        "resource": resource,
        "chat_configuration": chat_configuration,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output