Skip to content

start_practice_run

start_practice_run(
    resource_identifier: ResourceIdentifier,
    away_from: AvailabilityZone,
    comment: ZonalShiftComment,
    *,
    config_overrides: Optional[ARCZonalShiftClientConfig] = None,
) -> StartPracticeRunResponse

Start an on-demand practice run zonal shift in Amazon Application Recovery Controller. With zonal autoshift enabled, you can start an on-demand practice run to verify preparedness at any time. Amazon Web Services also runs automated practice runs about weekly when you have enabled zonal autoshift.

For more information, see Considerations when you configure zonal autoshift in the Amazon Application Recovery Controller Developer Guide.

Parameters:

  • resource_identifier (ResourceIdentifier) –

    The identifier for the resource that you want to start a practice run zonal shift for. The identifier is the Amazon Resource Name (ARN) for the resource.

  • away_from (AvailabilityZone) –

    The Availability Zone (for example, use1-az1) that traffic is shifted away from for the resource that you specify for the practice run.

  • comment (ZonalShiftComment) –

    The initial comment that you enter about the practice run. Be aware that this comment can be overwritten by Amazon Web Services if the automatic check for balanced capacity fails. For more information, see Capacity checks for practice runs in the Amazon Application Recovery Controller Developer Guide.

Raises:

Source code in docs_src/capo_arc_zonal_shift/_services/arc_zonal_shift.py
def start_practice_run(
    self,
    resource_identifier: "capo_arc_zonal_shift.types.resource_identifier.ResourceIdentifier",
    away_from: "capo_arc_zonal_shift.types.availability_zone.AvailabilityZone",
    comment: "capo_arc_zonal_shift.types.zonal_shift_comment.ZonalShiftComment",
    *,
    config_overrides: Optional[ARCZonalShiftClientConfig] = None,
) -> "capo_arc_zonal_shift.types.start_practice_run_response.StartPracticeRunResponse":
    """<p>Start an on-demand practice run zonal shift in Amazon Application Recovery Controller. With zonal autoshift enabled, you can start an on-demand practice run to verify preparedness at any time. Amazon Web Services also runs automated practice runs about weekly when you have enabled zonal autoshift.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/r53recovery/latest/dg/arc-zonal-autoshift.considerations.html"> Considerations when you configure zonal autoshift</a> in the Amazon Application Recovery Controller Developer Guide.</p>

    Args:
        resource_identifier: <p>The identifier for the resource that you want to start a practice run zonal shift for. The identifier is the Amazon Resource Name (ARN) for the resource.</p>
        away_from: <p>The Availability Zone (for example, <code>use1-az1</code>) that traffic is shifted away from for the resource that you specify for the practice run.</p>
        comment: <p>The initial comment that you enter about the practice run. Be aware that this comment can be overwritten by Amazon Web Services if the automatic check for balanced capacity fails. For more information, see <a href="https://docs.aws.amazon.com/r53recovery/latest/dg/arc-zonal-autoshift.how-it-works.capacity-check.html"> Capacity checks for practice runs</a> in the Amazon Application Recovery Controller Developer Guide. </p>

    Raises:
        capo_arc_zonal_shift.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_arc_zonal_shift.errors.conflict_exception.ConflictException: <p>The request could not be processed because of conflict in the current state of the resource.</p>
        capo_arc_zonal_shift.errors.internal_server_exception.InternalServerException: <p>There was an internal server error.</p>
        capo_arc_zonal_shift.errors.resource_not_found_exception.ResourceNotFoundException: <p>The input requested a resource that was not found.</p>
        capo_arc_zonal_shift.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_arc_zonal_shift.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_arc_zonal_shift.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_arc_zonal_shift.types.start_practice_run_request.StartPracticeRunRequest]",
    ) -> OperationResponse[
        "capo_arc_zonal_shift.types.start_practice_run_response.StartPracticeRunResponse"
    ]:
        import capo_arc_zonal_shift._operations.perc_data_plane.start_practice_run

        output, http_response = (
            capo_arc_zonal_shift._operations.perc_data_plane.start_practice_run.start_practice_run(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StartPracticeRun")
    )
    input_: capo_arc_zonal_shift.types.start_practice_run_request.StartPracticeRunRequest = {
        "resource_identifier": resource_identifier,
        "away_from": away_from,
        "comment": comment,
    }

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