Skip to content

update_recovery_plan_execution_step

update_recovery_plan_execution_step(
    recovery_plan_execution_step_arn: StrictDRSARN,
    *,
    config_overrides: Optional[drsClientConfig] = None,
    status: Optional[RecoveryPlanExecutionStepStatus] = None,
    servers: Optional[RecoveryPlanServers] = None,
    wait_duration_minutes: Optional[WaitDurationMinutes] = None,
) -> UpdateRecoveryPlanExecutionStepResponse

Updates an execution step. Supports two actions: (1) skip a step that is in NOT_STARTED or FAILED status; (2) update the wait duration of a WAIT type step that is in NOT_STARTED status.

Parameters:

  • recovery_plan_execution_step_arn (StrictDRSARN) –

    The ARN of the execution step to update.

  • status (Optional[RecoveryPlanExecutionStepStatus], default: None ) –

    Only SKIPPED is accepted. Step must be in NOT_STARTED or FAILED status.

  • servers (Optional[RecoveryPlanServers], default: None ) –

    Full replacement of the server list. Only allowed when the step is in NOT_STARTED status (Server type steps only).

  • wait_duration_minutes (Optional[WaitDurationMinutes], default: None ) –

    Updated wait duration. Only allowed when the step is in NOT_STARTED status (Wait type steps only).

Raises:

Source code in docs_src/capo_drs/_services/drs.py
def update_recovery_plan_execution_step(
    self,
    recovery_plan_execution_step_arn: "capo_drs.types.strict_drsarn.StrictDRSARN",
    *,
    config_overrides: Optional[drsClientConfig] = None,
    status: Optional[
        "capo_drs.types.recovery_plan_execution_step_status.RecoveryPlanExecutionStepStatus"
    ] = None,
    servers: Optional[
        "capo_drs.types.recovery_plan_servers.RecoveryPlanServers"
    ] = None,
    wait_duration_minutes: Optional[
        "capo_drs.types.wait_duration_minutes.WaitDurationMinutes"
    ] = None,
) -> "capo_drs.types.update_recovery_plan_execution_step_response.UpdateRecoveryPlanExecutionStepResponse":
    """<p>Updates an execution step. Supports two actions: (1) skip a step that is in <code>NOT_STARTED</code> or <code>FAILED</code> status; (2) update the wait duration of a <code>WAIT</code> type step that is in <code>NOT_STARTED</code> status.</p>

    Args:
        recovery_plan_execution_step_arn: <p>The ARN of the execution step to update.</p>
        status: Only SKIPPED is accepted. Step must be in NOT_STARTED or FAILED status.
        servers: Full replacement of the server list. Only allowed when the step is in NOT_STARTED status (Server type steps only).
        wait_duration_minutes: Updated wait duration. Only allowed when the step is in NOT_STARTED status (Wait type steps only).

    Raises:
        capo_drs.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_drs.errors.conflict_exception.ConflictException: <p>The request could not be completed due to a conflict with the current state of the target resource.</p>
        capo_drs.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
        capo_drs.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource for this operation was not found.</p>
        capo_drs.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_drs.errors.uninitialized_account_exception.UninitializedAccountException: <p>The account performing the request has not been initialized.</p>
        capo_drs.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the AWS service.</p>
        capo_drs.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_drs.types.update_recovery_plan_execution_step_request.UpdateRecoveryPlanExecutionStepRequest]",
    ) -> OperationResponse[
        "capo_drs.types.update_recovery_plan_execution_step_response.UpdateRecoveryPlanExecutionStepResponse"
    ]:
        import capo_drs._operations.elastic_disaster_recovery_service.update_recovery_plan_execution_step

        output, http_response = (
            capo_drs._operations.elastic_disaster_recovery_service.update_recovery_plan_execution_step.update_recovery_plan_execution_step(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateRecoveryPlanExecutionStep")
    )
    input_: capo_drs.types.update_recovery_plan_execution_step_request.UpdateRecoveryPlanExecutionStepRequest = {
        "recovery_plan_execution_step_arn": recovery_plan_execution_step_arn
    }
    if status is not None:
        input_["status"] = status
    if servers is not None:
        input_["servers"] = servers
    if wait_duration_minutes is not None:
        input_["wait_duration_minutes"] = wait_duration_minutes

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