update_bandwidth_rate_limit
async
¶
update_bandwidth_rate_limit(
gateway_arn: GatewayARN,
*,
config_overrides: Optional[AsyncStorageGatewayClientConfig] = None,
average_upload_rate_limit_in_bits_per_sec: Optional[
BandwidthUploadRateLimit
] = None,
average_download_rate_limit_in_bits_per_sec: Optional[
BandwidthDownloadRateLimit
] = None,
) -> UpdateBandwidthRateLimitOutput
Updates the bandwidth rate limits of a gateway. You can update both the upload and download bandwidth rate limit or specify only one of the two. If you don't set a bandwidth rate limit, the existing rate limit remains. This operation is supported only for the stored volume, cached volume, and tape gateway types. To update bandwidth rate limits for S3 file gateways, use UpdateBandwidthRateLimitSchedule.
By default, a gateway's bandwidth rate limits are not set. If you don't set any limit, the gateway does not have any limitations on its bandwidth usage and could potentially use the maximum available bandwidth.
To specify which gateway to update, use the Amazon Resource Name (ARN) of the gateway in your request.
Parameters:
-
average_upload_rate_limit_in_bits_per_sec(Optional[BandwidthUploadRateLimit], default:None) –The average upload bandwidth rate limit in bits per second.
-
average_download_rate_limit_in_bits_per_sec(Optional[BandwidthDownloadRateLimit], default:None) –The average download bandwidth rate limit in bits per second.
Raises:
-
InternalServerError–An internal server error has occurred during the request. For more information, see the error and message fields.
-
InvalidGatewayRequestException–An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To update the bandwidth rate limits of a gateway Updates the bandwidth rate limits of a gateway. Both the upload and download bandwidth rate limit can be set, or either one of the two. If a new limit is not set, the existing rate limit remains.
>>> await client.update_bandwidth_rate_limit(gateway_arn='arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B', average_upload_rate_limit_in_bits_per_sec=51200, average_download_rate_limit_in_bits_per_sec=102400)
Source code in docs_src/capo_storage_gateway/_services/async_storage_gateway.py
5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 | |