Skip to content

start_active_approval_team_deletion

start_active_approval_team_deletion(
    arn: ApprovalTeamArn,
    *,
    config_overrides: Optional[MPAClientConfig] = None,
    pending_window_days: Optional[int] = None,
) -> StartActiveApprovalTeamDeletionResponse

Starts the deletion process for an active approval team.

Deletions require team approval

Requests to delete an active team must be approved by the team.

Parameters:

  • pending_window_days (Optional[int], default: None ) –

    Number of days between when the team approves the delete request and when the team is deleted.

  • arn (ApprovalTeamArn) –

    Amazon Resource Name (ARN) for 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.

  • 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/mpa.py
def start_active_approval_team_deletion(
    self,
    arn: "capo_mpa.types.approval_team_arn.ApprovalTeamArn",
    *,
    config_overrides: Optional[MPAClientConfig] = None,
    pending_window_days: Optional[int] = None,
) -> "capo_mpa.types.start_active_approval_team_deletion_response.StartActiveApprovalTeamDeletionResponse":
    """<p>Starts the deletion process for an active approval team.</p> <note> <p> <b>Deletions require team approval</b> </p> <p>Requests to delete an active team must be approved by the team.</p> </note>

    Args:
        pending_window_days: <p>Number of days between when the team approves the delete request and when the team is deleted.</p>
        arn: <p>Amazon Resource Name (ARN) for 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.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.
    """

    def _handler(
        req: "OperationRequest[capo_mpa.types.start_active_approval_team_deletion_request.StartActiveApprovalTeamDeletionRequest]",
    ) -> OperationResponse[
        "capo_mpa.types.start_active_approval_team_deletion_response.StartActiveApprovalTeamDeletionResponse"
    ]:
        import capo_mpa._operations.aws_fluffy_core_service.start_active_approval_team_deletion

        output, http_response = (
            capo_mpa._operations.aws_fluffy_core_service.start_active_approval_team_deletion.start_active_approval_team_deletion(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StartActiveApprovalTeamDeletion")
    )
    input_: capo_mpa.types.start_active_approval_team_deletion_request.StartActiveApprovalTeamDeletionRequest = {
        "arn": arn
    }
    if pending_window_days is not None:
        input_["pending_window_days"] = pending_window_days

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