Skip to content

update_slack_channel_configuration async

update_slack_channel_configuration(
    team_id: teamId,
    channel_id: channelId,
    *,
    config_overrides: Optional[AsyncSupportAppClientConfig] = None,
    channel_name: Optional[channelName] = None,
    notify_on_create_or_reopen_case: Optional[booleanValue] = None,
    notify_on_add_correspondence_to_case: Optional[booleanValue] = None,
    notify_on_resolve_case: Optional[booleanValue] = None,
    notify_on_case_severity: Optional[NotificationSeverityLevel] = None,
    channel_role_arn: Optional[roleArn] = None,
) -> UpdateSlackChannelConfigurationResult

Updates the configuration for a Slack channel, such as case update notifications.

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.

  • channel_name (Optional[channelName], default: None ) –

    The Slack channel name that you want to update.

  • notify_on_create_or_reopen_case (Optional[booleanValue], default: None ) –

    Whether you want to get notified when a support case is created or reopened.

  • notify_on_add_correspondence_to_case (Optional[booleanValue], default: None ) –

    Whether you want to get notified when a support case has a new correspondence.

  • notify_on_resolve_case (Optional[booleanValue], default: None ) –

    Whether you want to get notified when a support case is resolved.

  • notify_on_case_severity (Optional[NotificationSeverityLevel], default: None ) –

    The case severity for a support case that you want to receive notifications.

    If you specify high or all, at least one of the following parameters must be true:

    • notifyOnAddCorrespondenceToCase

    • notifyOnCreateOrReopenCase

    • notifyOnResolveCase

    If you specify none, any of the following parameters that you specify in your request must be false:

    • notifyOnAddCorrespondenceToCase

    • notifyOnCreateOrReopenCase

    • notifyOnResolveCase

    If you don't specify these parameters in your request, the Amazon Web Services Support App uses the current values by default.

  • channel_role_arn (Optional[roleArn], default: None ) –

    The Amazon Resource Name (ARN) of an IAM role that you want to use to perform operations on Amazon Web Services. For more information, see Managing access to the Amazon Web Services Support App in the Amazon Web Services Support User Guide.

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 update_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,
    channel_name: Optional[
        "capo_support_app.types.channel_name.channelName"
    ] = None,
    notify_on_create_or_reopen_case: Optional[
        "capo_support_app.types.boolean_value.booleanValue"
    ] = None,
    notify_on_add_correspondence_to_case: Optional[
        "capo_support_app.types.boolean_value.booleanValue"
    ] = None,
    notify_on_resolve_case: Optional[
        "capo_support_app.types.boolean_value.booleanValue"
    ] = None,
    notify_on_case_severity: Optional[
        "capo_support_app.types.notification_severity_level.NotificationSeverityLevel"
    ] = None,
    channel_role_arn: Optional["capo_support_app.types.role_arn.roleArn"] = None,
) -> "capo_support_app.types.update_slack_channel_configuration_result.UpdateSlackChannelConfigurationResult":
    """<p>Updates the configuration for a Slack channel, such as case update notifications.</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>
        channel_name: <p>The Slack channel name that you want to update.</p>
        notify_on_create_or_reopen_case: <p>Whether you want to get notified when a support case is created or reopened.</p>
        notify_on_add_correspondence_to_case: <p>Whether you want to get notified when a support case has a new correspondence.</p>
        notify_on_resolve_case: <p>Whether you want to get notified when a support case is resolved.</p>
        notify_on_case_severity: <p>The case severity for a support case that you want to receive notifications.</p> <p>If you specify <code>high</code> or <code>all</code>, at least one of the following parameters must be <code>true</code>:</p> <ul> <li> <p> <code>notifyOnAddCorrespondenceToCase</code> </p> </li> <li> <p> <code>notifyOnCreateOrReopenCase</code> </p> </li> <li> <p> <code>notifyOnResolveCase</code> </p> </li> </ul> <p>If you specify <code>none</code>, any of the following parameters that you specify in your request must be <code>false</code>:</p> <ul> <li> <p> <code>notifyOnAddCorrespondenceToCase</code> </p> </li> <li> <p> <code>notifyOnCreateOrReopenCase</code> </p> </li> <li> <p> <code>notifyOnResolveCase</code> </p> </li> </ul> <note> <p>If you don't specify these parameters in your request, the Amazon Web Services Support App uses the current values by default.</p> </note>
        channel_role_arn: <p>The Amazon Resource Name (ARN) of an IAM role that you want to use to perform operations on Amazon Web Services. For more information, see <a href="https://docs.aws.amazon.com/awssupport/latest/user/support-app-permissions.html">Managing access to the Amazon Web Services Support App</a> in the <i>Amazon Web Services Support User Guide</i>.</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.update_slack_channel_configuration_request.UpdateSlackChannelConfigurationRequest]",
    ) -> AsyncOperationResponse[
        "capo_support_app.types.update_slack_channel_configuration_result.UpdateSlackChannelConfigurationResult"
    ]:
        import capo_support_app._operations.support_app.update_slack_channel_configuration

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateSlackChannelConfiguration")
    )
    input_: capo_support_app.types.update_slack_channel_configuration_request.UpdateSlackChannelConfigurationRequest = {
        "team_id": team_id,
        "channel_id": channel_id,
    }
    if channel_name is not None:
        input_["channel_name"] = channel_name
    if notify_on_create_or_reopen_case is not None:
        input_["notify_on_create_or_reopen_case"] = notify_on_create_or_reopen_case
    if notify_on_add_correspondence_to_case is not None:
        input_["notify_on_add_correspondence_to_case"] = (
            notify_on_add_correspondence_to_case
        )
    if notify_on_resolve_case is not None:
        input_["notify_on_resolve_case"] = notify_on_resolve_case
    if notify_on_case_severity is not None:
        input_["notify_on_case_severity"] = notify_on_case_severity
    if channel_role_arn is not None:
        input_["channel_role_arn"] = channel_role_arn

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