Skip to content

update_microsoft_teams_channel_configuration async

update_microsoft_teams_channel_configuration(
    chat_configuration_arn: ChatConfigurationArn,
    channel_id: TeamsChannelId,
    *,
    config_overrides: Optional[AsyncchatbotClientConfig] = None,
    channel_name: Optional[TeamsChannelName] = None,
    sns_topic_arns: Optional[SnsTopicArnList] = None,
    iam_role_arn: Optional[Arn] = None,
    logging_level: Optional[CustomerCwLogLevel] = None,
    guardrail_policy_arns: Optional[GuardrailPolicyArnList] = None,
    user_authorization_required: Optional[BooleanAccountPreference] = None,
) -> UpdateTeamsChannelConfigurationResult

Updates an Microsoft Teams channel configuration.

Parameters:

  • chat_configuration_arn (ChatConfigurationArn) –

    The Amazon Resource Name (ARN) of the TeamsChannelConfiguration to update.

  • channel_id (TeamsChannelId) –

    The ID of the Microsoft Teams channel.

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

    The name of the Microsoft Teams channel.

  • sns_topic_arns (Optional[SnsTopicArnList], default: None ) –

    The Amazon Resource Names (ARNs) of the SNS topics that deliver notifications to AWS Chatbot.

  • iam_role_arn (Optional[Arn], default: None ) –

    A user-defined role that AWS Chatbot assumes. This is not the service-linked role.

    For more information, see IAM policies for AWS Chatbot in the AWS Chatbot Administrator Guide.

  • logging_level (Optional[CustomerCwLogLevel], default: None ) –

    Logging levels include ERROR, INFO, or NONE.

  • guardrail_policy_arns (Optional[GuardrailPolicyArnList], default: None ) –

    The list of IAM policy ARNs that are applied as channel guardrails. The AWS managed AdministratorAccess policy is applied by default if this is not set.

  • user_authorization_required (Optional[BooleanAccountPreference], default: None ) –

    Enables use of a user role requirement in your chat configuration.

Raises:

Source code in docs_src/capo_chatbot/_services/async_chatbot.py
async def update_microsoft_teams_channel_configuration(
    self,
    chat_configuration_arn: "capo_chatbot.types.chat_configuration_arn.ChatConfigurationArn",
    channel_id: "capo_chatbot.types.teams_channel_id.TeamsChannelId",
    *,
    config_overrides: Optional[AsyncchatbotClientConfig] = None,
    channel_name: Optional[
        "capo_chatbot.types.teams_channel_name.TeamsChannelName"
    ] = None,
    sns_topic_arns: Optional[
        "capo_chatbot.types.sns_topic_arn_list.SnsTopicArnList"
    ] = None,
    iam_role_arn: Optional["capo_chatbot.types.arn.Arn"] = None,
    logging_level: Optional[
        "capo_chatbot.types.customer_cw_log_level.CustomerCwLogLevel"
    ] = None,
    guardrail_policy_arns: Optional[
        "capo_chatbot.types.guardrail_policy_arn_list.GuardrailPolicyArnList"
    ] = None,
    user_authorization_required: Optional[
        "capo_chatbot.types.boolean_account_preference.BooleanAccountPreference"
    ] = None,
) -> "capo_chatbot.types.update_teams_channel_configuration_result.UpdateTeamsChannelConfigurationResult":
    """<p>Updates an Microsoft Teams channel configuration.</p>

    Args:
        chat_configuration_arn: <p>The Amazon Resource Name (ARN) of the TeamsChannelConfiguration to update.</p>
        channel_id: <p>The ID of the Microsoft Teams channel.</p>
        channel_name: <p>The name of the Microsoft Teams channel.</p>
        sns_topic_arns: <p>The Amazon Resource Names (ARNs) of the SNS topics that deliver notifications to AWS Chatbot.</p>
        iam_role_arn: <p>A user-defined role that AWS Chatbot assumes. This is not the service-linked role.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/chatbot/latest/adminguide/chatbot-iam-policies.html">IAM policies for AWS Chatbot</a> in the <i> AWS Chatbot Administrator Guide</i>. </p>
        logging_level: <p>Logging levels include <code>ERROR</code>, <code>INFO</code>, or <code>NONE</code>.</p>
        guardrail_policy_arns: <p>The list of IAM policy ARNs that are applied as channel guardrails. The AWS managed <code>AdministratorAccess</code> policy is applied by default if this is not set. </p>
        user_authorization_required: <p>Enables use of a user role requirement in your chat configuration.</p>

    Raises:
        capo_chatbot.errors.invalid_parameter_exception.InvalidParameterException: <p>Your request input doesn't meet the constraints required by AWS Chatbot.</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.resource_not_found_exception.ResourceNotFoundException: <p>We were unable to find the resource for your request</p>
        capo_chatbot.errors.update_teams_channel_configuration_exception.UpdateTeamsChannelConfigurationException: <p>We can’t process your request right now because of a server issue. Try again later.</p>
        capo_chatbot.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_chatbot.types.update_teams_channel_configuration_request.UpdateTeamsChannelConfigurationRequest]",
    ) -> AsyncOperationResponse[
        "capo_chatbot.types.update_teams_channel_configuration_result.UpdateTeamsChannelConfigurationResult"
    ]:
        import capo_chatbot._operations.wheatley_orchestration_20171011.update_microsoft_teams_channel_configuration

        (
            output,
            http_response,
        ) = await capo_chatbot._operations.wheatley_orchestration_20171011.update_microsoft_teams_channel_configuration.async_update_microsoft_teams_channel_configuration(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_chatbot.types.update_teams_channel_configuration_request.UpdateTeamsChannelConfigurationRequest",
    ) -> dict[str, Any]:
        import capo_chatbot.types.update_teams_channel_configuration_request

        return capo_chatbot.types.update_teams_channel_configuration_request.redact_sensitive(
            input_
        )

    def _redact_output(
        output: "capo_chatbot.types.update_teams_channel_configuration_result.UpdateTeamsChannelConfigurationResult",
    ) -> dict[str, Any]:
        import capo_chatbot.types.update_teams_channel_configuration_result

        return capo_chatbot.types.update_teams_channel_configuration_result.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "UpdateMicrosoftTeamsChannelConfiguration",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_chatbot.types.update_teams_channel_configuration_request.UpdateTeamsChannelConfigurationRequest = {
        "chat_configuration_arn": chat_configuration_arn,
        "channel_id": channel_id,
    }
    if channel_name is not None:
        input_["channel_name"] = channel_name
    if sns_topic_arns is not None:
        input_["sns_topic_arns"] = sns_topic_arns
    if iam_role_arn is not None:
        input_["iam_role_arn"] = iam_role_arn
    if logging_level is not None:
        input_["logging_level"] = logging_level
    if guardrail_policy_arns is not None:
        input_["guardrail_policy_arns"] = guardrail_policy_arns
    if user_authorization_required is not None:
        input_["user_authorization_required"] = user_authorization_required

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