Skip to content

put_bandwidth_rate_limit_schedule

put_bandwidth_rate_limit_schedule(
    gateway_arn: GatewayArn,
    bandwidth_rate_limit_intervals: BandwidthRateLimitIntervals,
    *,
    config_overrides: Optional[BackupGatewayClientConfig] = None,
) -> PutBandwidthRateLimitScheduleOutput

This action sets the bandwidth rate limit schedule for a specified gateway. By default, gateways do not have a bandwidth rate limit schedule, which means no bandwidth rate limiting is in effect. Use this to initiate a gateway's bandwidth rate limit schedule.

Parameters:

  • gateway_arn (GatewayArn) –

    The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation to return a list of gateways for your account and Amazon Web Services Region.

  • bandwidth_rate_limit_intervals (BandwidthRateLimitIntervals) –

    An array containing bandwidth rate limit schedule intervals for a gateway. When no bandwidth rate limit intervals have been scheduled, the array is empty.

Raises:

Source code in docs_src/capo_backup_gateway/_services/backup_gateway.py
def put_bandwidth_rate_limit_schedule(
    self,
    gateway_arn: "capo_backup_gateway.types.gateway_arn.GatewayArn",
    bandwidth_rate_limit_intervals: "capo_backup_gateway.types.bandwidth_rate_limit_intervals.BandwidthRateLimitIntervals",
    *,
    config_overrides: Optional[BackupGatewayClientConfig] = None,
) -> "capo_backup_gateway.types.put_bandwidth_rate_limit_schedule_output.PutBandwidthRateLimitScheduleOutput":
    """<p>This action sets the bandwidth rate limit schedule for a specified gateway. By default, gateways do not have a bandwidth rate limit schedule, which means no bandwidth rate limiting is in effect. Use this to initiate a gateway's bandwidth rate limit schedule.</p>

    Args:
        gateway_arn: <p>The Amazon Resource Name (ARN) of the gateway. Use the <a href="https://docs.aws.amazon.com/aws-backup/latest/devguide/API_BGW_ListGateways.html"> <code>ListGateways</code> </a> operation to return a list of gateways for your account and Amazon Web Services Region.</p>
        bandwidth_rate_limit_intervals: <p>An array containing bandwidth rate limit schedule intervals for a gateway. When no bandwidth rate limit intervals have been scheduled, the array is empty.</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.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_bandwidth_rate_limit_schedule_input.PutBandwidthRateLimitScheduleInput]",
    ) -> OperationResponse[
        "capo_backup_gateway.types.put_bandwidth_rate_limit_schedule_output.PutBandwidthRateLimitScheduleOutput"
    ]:
        import capo_backup_gateway._operations.backup_on_premises_v20210101.put_bandwidth_rate_limit_schedule

        output, http_response = (
            capo_backup_gateway._operations.backup_on_premises_v20210101.put_bandwidth_rate_limit_schedule.put_bandwidth_rate_limit_schedule(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("PutBandwidthRateLimitSchedule")
    )
    input_: capo_backup_gateway.types.put_bandwidth_rate_limit_schedule_input.PutBandwidthRateLimitScheduleInput = {
        "gateway_arn": gateway_arn,
        "bandwidth_rate_limit_intervals": bandwidth_rate_limit_intervals,
    }

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