Skip to content

put_maintenance_start_time async

put_maintenance_start_time(
    gateway_arn: GatewayArn,
    hour_of_day: HourOfDay,
    minute_of_hour: MinuteOfHour,
    *,
    config_overrides: Optional[AsyncBackupGatewayClientConfig] = None,
    day_of_week: Optional[DayOfWeek] = None,
    day_of_month: Optional[DayOfMonth] = None,
) -> PutMaintenanceStartTimeOutput

Set the maintenance start time for a gateway.

Parameters:

  • gateway_arn (GatewayArn) –

    The Amazon Resource Name (ARN) for the gateway, used to specify its maintenance start time.

  • hour_of_day (HourOfDay) –

    The hour of the day to start maintenance on a gateway.

  • minute_of_hour (MinuteOfHour) –

    The minute of the hour to start maintenance on a gateway.

  • day_of_week (Optional[DayOfWeek], default: None ) –

    The day of the week to start maintenance on a gateway.

  • day_of_month (Optional[DayOfMonth], default: None ) –

    The day of the month start maintenance on a gateway.

    Valid values range from Sunday to Saturday.

Raises:

Source code in docs_src/capo_backup_gateway/_services/async_backup_gateway.py
async def put_maintenance_start_time(
    self,
    gateway_arn: "capo_backup_gateway.types.gateway_arn.GatewayArn",
    hour_of_day: "capo_backup_gateway.types.hour_of_day.HourOfDay",
    minute_of_hour: "capo_backup_gateway.types.minute_of_hour.MinuteOfHour",
    *,
    config_overrides: Optional[AsyncBackupGatewayClientConfig] = None,
    day_of_week: Optional["capo_backup_gateway.types.day_of_week.DayOfWeek"] = None,
    day_of_month: Optional[
        "capo_backup_gateway.types.day_of_month.DayOfMonth"
    ] = None,
) -> "capo_backup_gateway.types.put_maintenance_start_time_output.PutMaintenanceStartTimeOutput":
    """<p>Set the maintenance start time for a gateway.</p>

    Args:
        gateway_arn: <p>The Amazon Resource Name (ARN) for the gateway, used to specify its maintenance start time.</p>
        hour_of_day: <p>The hour of the day to start maintenance on a gateway.</p>
        minute_of_hour: <p>The minute of the hour to start maintenance on a gateway.</p>
        day_of_week: <p>The day of the week to start maintenance on a gateway.</p>
        day_of_month: <p>The day of the month start maintenance on a gateway.</p> <p>Valid values range from <code>Sunday</code> to <code>Saturday</code>.</p>

    Raises:
        capo_backup_gateway.errors.internal_server_exception.InternalServerException: <p>The operation did not succeed because an internal error occurred. Try again later.</p>
        capo_backup_gateway.errors.throttling_exception.ThrottlingException: <p>TPS has been limited to protect against intentional or unintentional high request volumes.</p>
        capo_backup_gateway.errors.validation_exception.ValidationException: <p>The operation did not succeed because a validation error occurred.</p>
        capo_backup_gateway.errors.conflict_exception.ConflictException: <p>The operation cannot proceed because it is not supported.</p>
        capo_backup_gateway.errors.resource_not_found_exception.ResourceNotFoundException: <p>A resource that is required for the action wasn't found.</p>
        capo_backup_gateway.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_backup_gateway.types.put_maintenance_start_time_input.PutMaintenanceStartTimeInput]",
    ) -> AsyncOperationResponse[
        "capo_backup_gateway.types.put_maintenance_start_time_output.PutMaintenanceStartTimeOutput"
    ]:
        import capo_backup_gateway._operations.backup_on_premises_v20210101.put_maintenance_start_time

        (
            output,
            http_response,
        ) = await capo_backup_gateway._operations.backup_on_premises_v20210101.put_maintenance_start_time.async_put_maintenance_start_time(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("PutMaintenanceStartTime")
    )
    input_: capo_backup_gateway.types.put_maintenance_start_time_input.PutMaintenanceStartTimeInput = {
        "gateway_arn": gateway_arn,
        "hour_of_day": hour_of_day,
        "minute_of_hour": minute_of_hour,
    }
    if day_of_week is not None:
        input_["day_of_week"] = day_of_week
    if day_of_month is not None:
        input_["day_of_month"] = day_of_month

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