Skip to content

delete_slack_channel_configuration async

delete_slack_channel_configuration(
    team_id: teamId,
    channel_id: channelId,
    *,
    config_overrides: Optional[AsyncSupportAppClientConfig] = None,
) -> DeleteSlackChannelConfigurationResult

Deletes a Slack channel configuration from your Amazon Web Services account. This operation doesn't delete your Slack channel.

Parameters:

  • team_id (teamId) –

    The team ID in Slack. This ID uniquely identifies a Slack workspace, such as T012ABCDEFG.

  • channel_id (channelId) –

    The channel ID in Slack. This ID identifies a channel within a Slack workspace.

Raises:

  • AccessDeniedException –

    You don't have sufficient permission to perform this action.

  • ConflictException –

    Your request has a conflict. For example, you might receive this error if you try the following:

    • Add, update, or delete a Slack channel configuration before you add a Slack workspace to your Amazon Web Services account.

    • Add a Slack channel configuration that already exists in your Amazon Web Services account.

    • Delete a Slack channel configuration for a live chat channel.

    • Delete a Slack workspace from your Amazon Web Services account that has an active live chat channel.

    • Call the RegisterSlackWorkspaceForOrganization API from an Amazon Web Services account that doesn't belong to an organization.

    • Call the RegisterSlackWorkspaceForOrganization API from a member account, but the management account hasn't registered that workspace yet for the organization.

  • InternalServerException –

    We can’t process your request right now because of a server issue. Try again later.

  • ResourceNotFoundException –

    The specified resource is missing or doesn't exist, such as an account alias, Slack channel configuration, or Slack workspace configuration.

  • ValidationException –

    Your request input doesn't meet the constraints that the Amazon Web Services Support App specifies.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_support_app/_services/async_support_app.py
async def delete_slack_channel_configuration(
    self,
    team_id: "capo_support_app.types.team_id.teamId",
    channel_id: "capo_support_app.types.channel_id.channelId",
    *,
    config_overrides: Optional[AsyncSupportAppClientConfig] = None,
) -> "capo_support_app.types.delete_slack_channel_configuration_result.DeleteSlackChannelConfigurationResult":
    """<p>Deletes a Slack channel configuration from your Amazon Web Services account. This operation doesn't delete your Slack channel.</p>

    Args:
        team_id: <p>The team ID in Slack. This ID uniquely identifies a Slack workspace, such as <code>T012ABCDEFG</code>.</p>
        channel_id: <p>The channel ID in Slack. This ID identifies a channel within a Slack workspace.</p>

    Raises:
        capo_support_app.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient permission to perform this action.</p>
        capo_support_app.errors.conflict_exception.ConflictException: <p>Your request has a conflict. For example, you might receive this error if you try the following:</p> <ul> <li> <p>Add, update, or delete a Slack channel configuration before you add a Slack workspace to your Amazon Web Services account.</p> </li> <li> <p>Add a Slack channel configuration that already exists in your Amazon Web Services account.</p> </li> <li> <p>Delete a Slack channel configuration for a live chat channel.</p> </li> <li> <p>Delete a Slack workspace from your Amazon Web Services account that has an active live chat channel.</p> </li> <li> <p>Call the <code>RegisterSlackWorkspaceForOrganization</code> API from an Amazon Web Services account that doesn't belong to an organization.</p> </li> <li> <p>Call the <code>RegisterSlackWorkspaceForOrganization</code> API from a member account, but the management account hasn't registered that workspace yet for the organization.</p> </li> </ul>
        capo_support_app.errors.internal_server_exception.InternalServerException: <p>We can’t process your request right now because of a server issue. Try again later.</p>
        capo_support_app.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource is missing or doesn't exist, such as an account alias, Slack channel configuration, or Slack workspace configuration.</p>
        capo_support_app.errors.validation_exception.ValidationException: <p>Your request input doesn't meet the constraints that the Amazon Web Services Support App specifies.</p>
        capo_support_app.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_support_app.types.delete_slack_channel_configuration_request.DeleteSlackChannelConfigurationRequest]",
    ) -> AsyncOperationResponse[
        "capo_support_app.types.delete_slack_channel_configuration_result.DeleteSlackChannelConfigurationResult"
    ]:
        import capo_support_app._operations.support_app.delete_slack_channel_configuration

        (
            output,
            http_response,
        ) = await capo_support_app._operations.support_app.delete_slack_channel_configuration.async_delete_slack_channel_configuration(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteSlackChannelConfiguration")
    )
    input_: capo_support_app.types.delete_slack_channel_configuration_request.DeleteSlackChannelConfigurationRequest = {
        "team_id": team_id,
        "channel_id": channel_id,
    }

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