describe_bandwidth_rate_limit

describe_bandwidth_rate_limit(**kwargs)

Returns the bandwidth rate limits of a gateway. By default, these limits are not set, which means no bandwidth rate limiting is in effect. This operation is supported only for the stored volume, cached volume, and tape gateway types. To describe bandwidth rate limits for S3 file gateways, use DescribeBandwidthRateLimitSchedule.

This operation returns a value for a bandwidth rate limit only if the limit is set. If no limits are set for the gateway, then this operation returns only the gateway ARN in the response body. To specify which gateway to describe, use the Amazon Resource Name (ARN) of the gateway in your request.

See also: AWS API Documentation

Request Syntax

response = client.describe_bandwidth_rate_limit(
    GatewayARN='string'
)
Parameters
GatewayARN (string) --

[REQUIRED]

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.

Return type
dict
Returns
Response Syntax
{
    'GatewayARN': 'string',
    'AverageUploadRateLimitInBitsPerSec': 123,
    'AverageDownloadRateLimitInBitsPerSec': 123
}

Response Structure

  • (dict) --

    A JSON object containing the following fields:

    • GatewayARN (string) --

      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.

    • AverageUploadRateLimitInBitsPerSec (integer) --

      The average upload bandwidth rate limit in bits per second. This field does not appear in the response if the upload rate limit is not set.

    • AverageDownloadRateLimitInBitsPerSec (integer) --

      The average download bandwidth rate limit in bits per second. This field does not appear in the response if the download rate limit is not set.

Exceptions

  • StorageGateway.Client.exceptions.InvalidGatewayRequestException
  • StorageGateway.Client.exceptions.InternalServerError

Examples

Returns a value for a bandwidth rate limit if set. If not set, then only the gateway ARN is returned.

response = client.describe_bandwidth_rate_limit(
    GatewayARN='arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B',
)

print(response)

Expected Output:

{
    'AverageDownloadRateLimitInBitsPerSec': 204800,
    'AverageUploadRateLimitInBitsPerSec': 102400,
    'GatewayARN': 'arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B',
    'ResponseMetadata': {
        '...': '...',
    },
}