Skip to content

create_slack_channel_configuration

create_slack_channel_configuration(
    team_id: teamId,
    channel_id: channelId,
    notify_on_case_severity: NotificationSeverityLevel,
    channel_role_arn: roleArn,
    *,
    config_overrides: Optional[SupportAppClientConfig] = 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,
) -> CreateSlackChannelConfigurationResult

Creates a Slack channel configuration for your Amazon Web Services account.

  • You can add up to 5 Slack workspaces for your account.

  • You can add up to 20 Slack channels for your account.

A Slack channel can have up to 100 Amazon Web Services accounts. This means that only 100 accounts can add the same Slack channel to the Amazon Web Services Support App. We recommend that you only add the accounts that you need to manage support cases for your organization. This can reduce the notifications about case updates that you receive in the Slack channel.

We recommend that you choose a private Slack channel so that only members in that channel have read and write access to your support cases. Anyone in your Slack channel can create, update, or resolve support cases for your account. Users require an invitation to join private channels.

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 name of the Slack channel that you configure for the Amazon Web Services Support App.

  • 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 (NotificationSeverityLevel) –

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

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

    • notifyOnAddCorrespondenceToCase

    • notifyOnCreateOrReopenCase

    • notifyOnResolveCase

    If you specify none, the following parameters must be null or false:

    • notifyOnAddCorrespondenceToCase

    • notifyOnCreateOrReopenCase

    • notifyOnResolveCase

    If you don't specify these parameters in your request, they default to false.

  • channel_role_arn (roleArn) –

    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.

  • ServiceQuotaExceededException –

    Your Service Quotas request exceeds the quota for the service. For example, your Service Quotas request to Amazon Web Services Support App might exceed the maximum number of workspaces or channels per account, or the maximum number of accounts per Slack channel.

  • 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/support_app.py
def create_slack_channel_configuration(
    self,
    team_id: "capo_support_app.types.team_id.teamId",
    channel_id: "capo_support_app.types.channel_id.channelId",
    notify_on_case_severity: "capo_support_app.types.notification_severity_level.NotificationSeverityLevel",
    channel_role_arn: "capo_support_app.types.role_arn.roleArn",
    *,
    config_overrides: Optional[SupportAppClientConfig] = 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,
) -> "capo_support_app.types.create_slack_channel_configuration_result.CreateSlackChannelConfigurationResult":
    """<p>Creates a Slack channel configuration for your Amazon Web Services account.</p> <note> <ul> <li> <p>You can add up to 5 Slack workspaces for your account.</p> </li> <li> <p>You can add up to 20 Slack channels for your account.</p> </li> </ul> </note> <p>A Slack channel can have up to 100 Amazon Web Services accounts. This means that only 100 accounts can add the same Slack channel to the Amazon Web Services Support App. We recommend that you only add the accounts that you need to manage support cases for your organization. This can reduce the notifications about case updates that you receive in the Slack channel.</p> <note> <p>We recommend that you choose a private Slack channel so that only members in that channel have read and write access to your support cases. Anyone in your Slack channel can create, update, or resolve support cases for your account. Users require an invitation to join private channels. </p> </note>

    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 name of the Slack channel that you configure for the Amazon Web Services Support App.</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>, you must specify <code>true</code> for at least one of the following parameters:</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>, the following parameters must be null or <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, they default to <code>false</code>.</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.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>Your Service Quotas request exceeds the quota for the service. For example, your Service Quotas request to Amazon Web Services Support App might exceed the maximum number of workspaces or channels per account, or the maximum number of accounts per Slack channel.</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.
    """

    def _handler(
        req: "OperationRequest[capo_support_app.types.create_slack_channel_configuration_request.CreateSlackChannelConfigurationRequest]",
    ) -> OperationResponse[
        "capo_support_app.types.create_slack_channel_configuration_result.CreateSlackChannelConfigurationResult"
    ]:
        import capo_support_app._operations.support_app.create_slack_channel_configuration

        output, http_response = (
            capo_support_app._operations.support_app.create_slack_channel_configuration.create_slack_channel_configuration(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateSlackChannelConfiguration")
    )
    input_: capo_support_app.types.create_slack_channel_configuration_request.CreateSlackChannelConfigurationRequest = {
        "team_id": team_id,
        "channel_id": channel_id,
        "notify_on_case_severity": notify_on_case_severity,
        "channel_role_arn": channel_role_arn,
    }
    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

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