Skip to content

update_approval_team async

update_approval_team(
    arn: ApprovalTeamArn,
    *,
    config_overrides: Optional[AsyncMPAClientConfig] = None,
    approval_strategy: Optional[ApprovalStrategy] = None,
    approvers: Optional[ApprovalTeamRequestApprovers] = None,
    description: Optional[Description] = None,
    update_actions: Optional[UpdateActions] = None,
) -> UpdateApprovalTeamResponse

Updates an approval team. You can request to update the team description, approval threshold, and approvers in the team.

Updates require team approval

Updates to an active team must be approved by the team.

Parameters:

  • approval_strategy (Optional[ApprovalStrategy], default: None ) –

    An ApprovalStrategy object. Contains details for how the team grants approval.

  • approvers (Optional[ApprovalTeamRequestApprovers], default: None ) –

    An array of ApprovalTeamRequestApprover objects. Contains details for the approvers in the team.

  • description (Optional[Description], default: None ) –

    Description for the team.

  • arn (ApprovalTeamArn) –

    Amazon Resource Name (ARN) for the team.

  • update_actions (Optional[UpdateActions], default: None ) –

    A list of UpdateAction to perform when updating the team.

Raises:

  • AccessDeniedException –

    You do not have sufficient access to perform this action. Check your permissions, and try again.

  • ConflictException –

    The request cannot be completed because it conflicts with the current state of a resource.

  • InternalServerException –

    The service encountered an internal error. Try your request again. If the problem persists, contact Amazon Web Services Support.

  • ResourceNotFoundException –

    The specified resource doesn't exist. Check the resource ID, and try again.

  • ServiceQuotaExceededException –

    The request exceeds the service quota for your account. Request a quota increase or reduce your request size.

  • ThrottlingException –

    The request was denied due to request throttling.

  • ValidationException –

    The input fails to satisfy the constraints specified by an Amazon Web Services service.

  • UnknownServiceError –

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

Source code in docs_src/capo_mpa/_services/async_mpa.py
async def update_approval_team(
    self,
    arn: "capo_mpa.types.approval_team_arn.ApprovalTeamArn",
    *,
    config_overrides: Optional[AsyncMPAClientConfig] = None,
    approval_strategy: Optional[
        "capo_mpa.types.approval_strategy.ApprovalStrategy"
    ] = None,
    approvers: Optional[
        "capo_mpa.types.approval_team_request_approvers.ApprovalTeamRequestApprovers"
    ] = None,
    description: Optional["capo_mpa.types.description.Description"] = None,
    update_actions: Optional["capo_mpa.types.update_actions.UpdateActions"] = None,
) -> "capo_mpa.types.update_approval_team_response.UpdateApprovalTeamResponse":
    """<p>Updates an approval team. You can request to update the team description, approval threshold, and approvers in the team.</p> <note> <p> <b>Updates require team approval</b> </p> <p>Updates to an active team must be approved by the team.</p> </note>

    Args:
        approval_strategy: <p>An <code>ApprovalStrategy</code> object. Contains details for how the team grants approval.</p>
        approvers: <p>An array of <code>ApprovalTeamRequestApprover</code> objects. Contains details for the approvers in the team.</p>
        description: <p>Description for the team.</p>
        arn: <p>Amazon Resource Name (ARN) for the team.</p>
        update_actions: <p>A list of <code>UpdateAction</code> to perform when updating the team.</p>

    Raises:
        capo_mpa.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action. Check your permissions, and try again.</p>
        capo_mpa.errors.conflict_exception.ConflictException: <p>The request cannot be completed because it conflicts with the current state of a resource.</p>
        capo_mpa.errors.internal_server_exception.InternalServerException: <p>The service encountered an internal error. Try your request again. If the problem persists, contact Amazon Web Services Support.</p>
        capo_mpa.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource doesn't exist. Check the resource ID, and try again.</p>
        capo_mpa.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request exceeds the service quota for your account. Request a quota increase or reduce your request size.</p>
        capo_mpa.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_mpa.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_mpa.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_mpa.types.update_approval_team_request.UpdateApprovalTeamRequest]",
    ) -> AsyncOperationResponse[
        "capo_mpa.types.update_approval_team_response.UpdateApprovalTeamResponse"
    ]:
        import capo_mpa._operations.aws_fluffy_core_service.update_approval_team

        (
            output,
            http_response,
        ) = await capo_mpa._operations.aws_fluffy_core_service.update_approval_team.async_update_approval_team(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_mpa.types.update_approval_team_request.UpdateApprovalTeamRequest",
    ) -> dict[str, Any]:
        import capo_mpa.types.update_approval_team_request

        return capo_mpa.types.update_approval_team_request.redact_sensitive(input_)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("UpdateApprovalTeam", redact_input=_redact_input),
    )
    input_: capo_mpa.types.update_approval_team_request.UpdateApprovalTeamRequest = {
        "arn": arn
    }
    if approval_strategy is not None:
        input_["approval_strategy"] = approval_strategy
    if approvers is not None:
        input_["approvers"] = approvers
    if description is not None:
        input_["description"] = description
    if update_actions is not None:
        input_["update_actions"] = update_actions

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