- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
UpdateBandwidthRateLimitScheduleCommand
Updates the bandwidth rate limit schedule for a specified gateway. By default, gateways do not have bandwidth rate limit schedules, which means no bandwidth rate limiting is in effect. Use this to initiate or update a gateway's bandwidth rate limit schedule. This operation is supported for volume, tape, and S3 file gateways. S3 file gateways support bandwidth rate limits for upload only. FSx file gateways do not support bandwidth rate limits.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { StorageGatewayClient, UpdateBandwidthRateLimitScheduleCommand } from "@aws-sdk/client-storage-gateway"; // ES Modules import
// const { StorageGatewayClient, UpdateBandwidthRateLimitScheduleCommand } = require("@aws-sdk/client-storage-gateway"); // CommonJS import
const client = new StorageGatewayClient(config);
const input = { // UpdateBandwidthRateLimitScheduleInput
GatewayARN: "STRING_VALUE", // required
BandwidthRateLimitIntervals: [ // BandwidthRateLimitIntervals // required
{ // BandwidthRateLimitInterval
StartHourOfDay: Number("int"), // required
StartMinuteOfHour: Number("int"), // required
EndHourOfDay: Number("int"), // required
EndMinuteOfHour: Number("int"), // required
DaysOfWeek: [ // DaysOfWeek // required
Number("int"),
],
AverageUploadRateLimitInBitsPerSec: Number("long"),
AverageDownloadRateLimitInBitsPerSec: Number("long"),
},
],
};
const command = new UpdateBandwidthRateLimitScheduleCommand(input);
const response = await client.send(command);
// { // UpdateBandwidthRateLimitScheduleOutput
// GatewayARN: "STRING_VALUE",
// };
UpdateBandwidthRateLimitScheduleCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
BandwidthRateLimitIntervals Required | BandwidthRateLimitInterval[] | undefined | An array containing bandwidth rate limit schedule intervals for a gateway. When no bandwidth rate limit intervals have been scheduled, the array is empty. |
GatewayARN Required | string | undefined | 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. |
UpdateBandwidthRateLimitScheduleCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
GatewayARN | string | undefined | 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. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InternalServerError | server | An internal server error has occurred during the request. For more information, see the error and message fields. |
InvalidGatewayRequestException | client | An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields. |
StorageGatewayServiceException | Base exception class for all service exceptions from StorageGateway service. |