Skip to content

update_practice_run_configuration

update_practice_run_configuration(
    resource_identifier: ResourceIdentifier,
    *,
    config_overrides: Optional[ARCZonalShiftClientConfig] = None,
    blocked_windows: Optional[BlockedWindows] = None,
    blocked_dates: Optional[BlockedDates] = None,
    blocking_alarms: Optional[BlockingAlarms] = None,
    allowed_windows: Optional[AllowedWindows] = None,
    outcome_alarms: Optional[OutcomeAlarms] = None,
) -> UpdatePracticeRunConfigurationResponse

Update a practice run configuration to change one or more of the following: add, change, or remove the blocking alarm; change the outcome alarm; or add, change, or remove blocking dates or time windows.

Parameters:

  • resource_identifier (ResourceIdentifier) –

    The identifier for the resource that you want to update the practice run configuration for. The identifier is the Amazon Resource Name (ARN) for the resource.

  • blocked_windows (Optional[BlockedWindows], default: None ) –

    Add, change, or remove windows of days and times for when you can, optionally, block ARC from starting a practice run for a resource.

    The format for blocked windows is: DAY:HH:SS-DAY:HH:SS. Keep in mind, when you specify dates, that dates and times for practice runs are in UTC. Also, be aware of potential time adjustments that might be required for daylight saving time differences. Separate multiple blocked windows with spaces.

    For example, say you run business report summaries three days a week. For this scenario, you might set the following recurring days and times as blocked windows, for example: MON-20:30-21:30 WED-20:30-21:30 FRI-20:30-21:30.

  • blocked_dates (Optional[BlockedDates], default: None ) –

    Add, change, or remove blocked dates for a practice run in zonal autoshift.

    Optionally, you can block practice runs for specific calendar dates. The format for blocked dates is: YYYY-MM-DD. Keep in mind, when you specify dates, that dates and times for practice runs are in UTC. Separate multiple blocked dates with spaces.

    For example, if you have an application update scheduled to launch on May 1, 2024, and you don't want practice runs to shift traffic away at that time, you could set a blocked date for 2024-05-01.

  • blocking_alarms (Optional[BlockingAlarms], default: None ) –

    Add, change, or remove the Amazon CloudWatch alarms that you optionally specify as the blocking alarms for practice runs.

  • allowed_windows (Optional[AllowedWindows], default: None ) –

    Add, change, or remove windows of days and times for when you can, optionally, allow ARC to start a practice run for a resource.

    The format for allowed windows is: DAY:HH:SS-DAY:HH:SS. Keep in mind, when you specify dates, that dates and times for practice runs are in UTC. Also, be aware of potential time adjustments that might be required for daylight saving time differences. Separate multiple allowed windows with spaces.

    For example, say you want to allow practice runs only on Wednesdays and Fridays from noon to 5 p.m. For this scenario, you could set the following recurring days and times as allowed windows, for example: Wed-12:00-Wed:17:00 Fri-12:00-Fri:17:00.

    The allowedWindows have to start and end on the same day. Windows that span multiple days aren't supported.

  • outcome_alarms (Optional[OutcomeAlarms], default: None ) –

    Specify one or more Amazon CloudWatch alarms as the outcome alarms for practice runs.

Raises:

Source code in docs_src/capo_arc_zonal_shift/_services/arc_zonal_shift.py
def update_practice_run_configuration(
    self,
    resource_identifier: "capo_arc_zonal_shift.types.resource_identifier.ResourceIdentifier",
    *,
    config_overrides: Optional[ARCZonalShiftClientConfig] = None,
    blocked_windows: Optional[
        "capo_arc_zonal_shift.types.blocked_windows.BlockedWindows"
    ] = None,
    blocked_dates: Optional[
        "capo_arc_zonal_shift.types.blocked_dates.BlockedDates"
    ] = None,
    blocking_alarms: Optional[
        "capo_arc_zonal_shift.types.blocking_alarms.BlockingAlarms"
    ] = None,
    allowed_windows: Optional[
        "capo_arc_zonal_shift.types.allowed_windows.AllowedWindows"
    ] = None,
    outcome_alarms: Optional[
        "capo_arc_zonal_shift.types.outcome_alarms.OutcomeAlarms"
    ] = None,
) -> "capo_arc_zonal_shift.types.update_practice_run_configuration_response.UpdatePracticeRunConfigurationResponse":
    """<p>Update a practice run configuration to change one or more of the following: add, change, or remove the blocking alarm; change the outcome alarm; or add, change, or remove blocking dates or time windows.</p>

    Args:
        resource_identifier: <p>The identifier for the resource that you want to update the practice run configuration for. The identifier is the Amazon Resource Name (ARN) for the resource.</p>
        blocked_windows: <p>Add, change, or remove windows of days and times for when you can, optionally, block ARC from starting a practice run for a resource.</p> <p>The format for blocked windows is: DAY:HH:SS-DAY:HH:SS. Keep in mind, when you specify dates, that dates and times for practice runs are in UTC. Also, be aware of potential time adjustments that might be required for daylight saving time differences. Separate multiple blocked windows with spaces.</p> <p>For example, say you run business report summaries three days a week. For this scenario, you might set the following recurring days and times as blocked windows, for example: <code>MON-20:30-21:30 WED-20:30-21:30 FRI-20:30-21:30</code>.</p>
        blocked_dates: <p>Add, change, or remove blocked dates for a practice run in zonal autoshift.</p> <p>Optionally, you can block practice runs for specific calendar dates. The format for blocked dates is: YYYY-MM-DD. Keep in mind, when you specify dates, that dates and times for practice runs are in UTC. Separate multiple blocked dates with spaces.</p> <p>For example, if you have an application update scheduled to launch on May 1, 2024, and you don't want practice runs to shift traffic away at that time, you could set a blocked date for <code>2024-05-01</code>.</p>
        blocking_alarms: <p>Add, change, or remove the Amazon CloudWatch alarms that you optionally specify as the blocking alarms for practice runs.</p>
        allowed_windows: <p>Add, change, or remove windows of days and times for when you can, optionally, allow ARC to start a practice run for a resource.</p> <p>The format for allowed windows is: DAY:HH:SS-DAY:HH:SS. Keep in mind, when you specify dates, that dates and times for practice runs are in UTC. Also, be aware of potential time adjustments that might be required for daylight saving time differences. Separate multiple allowed windows with spaces.</p> <p>For example, say you want to allow practice runs only on Wednesdays and Fridays from noon to 5 p.m. For this scenario, you could set the following recurring days and times as allowed windows, for example: <code>Wed-12:00-Wed:17:00 Fri-12:00-Fri:17:00</code>.</p> <important> <p>The <code>allowedWindows</code> have to start and end on the same day. Windows that span multiple days aren't supported.</p> </important>
        outcome_alarms: <p>Specify one or more Amazon CloudWatch alarms as the outcome alarms for practice runs.</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.update_practice_run_configuration_request.UpdatePracticeRunConfigurationRequest]",
    ) -> OperationResponse[
        "capo_arc_zonal_shift.types.update_practice_run_configuration_response.UpdatePracticeRunConfigurationResponse"
    ]:
        import capo_arc_zonal_shift._operations.perc_data_plane.update_practice_run_configuration

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdatePracticeRunConfiguration")
    )
    input_: capo_arc_zonal_shift.types.update_practice_run_configuration_request.UpdatePracticeRunConfigurationRequest = {
        "resource_identifier": resource_identifier
    }
    if blocked_windows is not None:
        input_["blocked_windows"] = blocked_windows
    if blocked_dates is not None:
        input_["blocked_dates"] = blocked_dates
    if blocking_alarms is not None:
        input_["blocking_alarms"] = blocking_alarms
    if allowed_windows is not None:
        input_["allowed_windows"] = allowed_windows
    if outcome_alarms is not None:
        input_["outcome_alarms"] = outcome_alarms

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