Registers a Slack workspace for your Amazon Web Services account. To call this API, your account must be part of an organization in Organizations.
If you're the management account and you want to register Slack workspaces for your organization, you must complete the following tasks:
-
Sign in to the Amazon Web Services Support Center and authorize the Slack workspaces where you want your organization to have access to. See Authorize a Slack workspace in the Amazon Web Services Support User Guide.
-
Call the RegisterSlackWorkspaceForOrganization API to authorize each Slack workspace for the organization.
After the management account authorizes the Slack workspace, member accounts can call this API to authorize the same Slack workspace for their individual accounts. Member accounts don't need to authorize the Slack workspace manually through the Amazon Web Services Support Center.
To use the Amazon Web Services Support App, each account must then complete the following tasks:
Parameters:
-
team_id
(teamId)
–
The team ID in Slack. This ID uniquely identifies a Slack workspace, such as T012ABCDEFG. Specify the Slack workspace that you want to use for your organization.
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/support_app.py
| def register_slack_workspace_for_organization(
self,
team_id: "capo_support_app.types.team_id.teamId",
*,
config_overrides: Optional[SupportAppClientConfig] = None,
) -> "capo_support_app.types.register_slack_workspace_for_organization_result.RegisterSlackWorkspaceForOrganizationResult":
"""<p>Registers a Slack workspace for your Amazon Web Services account. To call this API, your account must be part of an organization in Organizations.</p> <p>If you're the <i>management account</i> and you want to register Slack workspaces for your organization, you must complete the following tasks:</p> <ol> <li> <p>Sign in to the <a href="https://console.aws.amazon.com/support/app">Amazon Web Services Support Center</a> and authorize the Slack workspaces where you want your organization to have access to. See <a href="https://docs.aws.amazon.com/awssupport/latest/user/authorize-slack-workspace.html">Authorize a Slack workspace</a> in the <i>Amazon Web Services Support User Guide</i>.</p> </li> <li> <p>Call the <code>RegisterSlackWorkspaceForOrganization</code> API to authorize each Slack workspace for the organization.</p> </li> </ol> <p>After the management account authorizes the Slack workspace, member accounts can call this API to authorize the same Slack workspace for their individual accounts. Member accounts don't need to authorize the Slack workspace manually through the <a href="https://console.aws.amazon.com/support/app">Amazon Web Services Support Center</a>.</p> <p>To use the Amazon Web Services Support App, each account must then complete the following tasks:</p> <ul> <li> <p>Create an Identity and Access Management (IAM) role with the required permission. 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>.</p> </li> <li> <p>Configure a Slack channel to use the Amazon Web Services Support App for support cases for that account. For more information, see <a href="https://docs.aws.amazon.com/awssupport/latest/user/add-your-slack-channel.html">Configuring a Slack channel</a>.</p> </li> </ul>
Args:
team_id: <p>The team ID in Slack. This ID uniquely identifies a Slack workspace, such as <code>T012ABCDEFG</code>. Specify the Slack workspace that you want to use for your organization.</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.
"""
def _handler(
req: "OperationRequest[capo_support_app.types.register_slack_workspace_for_organization_request.RegisterSlackWorkspaceForOrganizationRequest]",
) -> OperationResponse[
"capo_support_app.types.register_slack_workspace_for_organization_result.RegisterSlackWorkspaceForOrganizationResult"
]:
import capo_support_app._operations.support_app.register_slack_workspace_for_organization
output, http_response = (
capo_support_app._operations.support_app.register_slack_workspace_for_organization.register_slack_workspace_for_organization(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("RegisterSlackWorkspaceForOrganization")
)
input_: capo_support_app.types.register_slack_workspace_for_organization_request.RegisterSlackWorkspaceForOrganizationRequest = {
"team_id": team_id
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|