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[BackupGatewayClientConfig] = 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.
"""
def _handler(
req: "OperationRequest[capo_backup_gateway.types.put_maintenance_start_time_input.PutMaintenanceStartTimeInput]",
) -> OperationResponse[
"capo_backup_gateway.types.put_maintenance_start_time_output.PutMaintenanceStartTimeOutput"
]:
if req.options.protocol == "awsJson1_0":
import capo_backup_gateway._operations.backup_on_premises_v20210101.aws_json1_0.put_maintenance_start_time
output, http_response = (
capo_backup_gateway._operations.backup_on_premises_v20210101.aws_json1_0.put_maintenance_start_time.put_maintenance_start_time(
req.options, req.input
)
)
elif req.options.protocol == "rpcv2Cbor":
import capo_backup_gateway._operations.backup_on_premises_v20210101.rpcv2_cbor.put_maintenance_start_time
output, http_response = (
capo_backup_gateway._operations.backup_on_premises_v20210101.rpcv2_cbor.put_maintenance_start_time.put_maintenance_start_time(
req.options, req.input
)
)
else:
raise ValueError(f"unknown protocol {req.options.protocol!r}")
return OperationResponse(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 = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output