We are excited to announce our new API Documentation.
Protected
Creates a usage limit for a specified Amazon Redshift feature on a cluster. The usage limit is identified by the returned usage limit identifier.
Use a bare-bones client and the command you need to make an API call.
import { RedshiftClient, CreateUsageLimitCommand } from "@aws-sdk/client-redshift"; // ES Modules import// const { RedshiftClient, CreateUsageLimitCommand } = require("@aws-sdk/client-redshift"); // CommonJS importconst client = new RedshiftClient(config);const input = { // CreateUsageLimitMessage ClusterIdentifier: "STRING_VALUE", // required FeatureType: "spectrum" || "concurrency-scaling" || "cross-region-datasharing", // required LimitType: "time" || "data-scanned", // required Amount: Number("long"), // required Period: "daily" || "weekly" || "monthly", BreachAction: "log" || "emit-metric" || "disable", Tags: [ // TagList { // Tag Key: "STRING_VALUE", Value: "STRING_VALUE", }, ],};const command = new CreateUsageLimitCommand(input);const response = await client.send(command);// { // UsageLimit// UsageLimitId: "STRING_VALUE",// ClusterIdentifier: "STRING_VALUE",// FeatureType: "spectrum" || "concurrency-scaling" || "cross-region-datasharing",// LimitType: "time" || "data-scanned",// Amount: Number("long"),// Period: "daily" || "weekly" || "monthly",// BreachAction: "log" || "emit-metric" || "disable",// Tags: [ // TagList// { // Tag// Key: "STRING_VALUE",// Value: "STRING_VALUE",// },// ],// };
CreateUsageLimitCommandInput
CreateUsageLimitCommandOutput
input
response
config
ClusterNotFoundFault (client fault)
The ClusterIdentifier parameter does not refer to an existing cluster.
ClusterIdentifier
InvalidClusterStateFault (client fault)
The specified cluster is not in the available state.
available
InvalidUsageLimitFault (client fault)
The usage limit is not valid.
LimitExceededFault (client fault)
The encryption key has exceeded its grant limit in Amazon Web Services KMS.
TagLimitExceededFault (client fault)
You have exceeded the number of tags allowed.
UnsupportedOperationFault (client fault)
The requested operation isn't supported.
UsageLimitAlreadyExistsFault (client fault)
The usage limit already exists.
RedshiftServiceException
Base exception class for all service exceptions from Redshift service.
Readonly
Static
Creates a usage limit for a specified Amazon Redshift feature on a cluster. The usage limit is identified by the returned usage limit identifier.
Example
Use a bare-bones client and the command you need to make an API call.
Param
CreateUsageLimitCommandInput
Returns
CreateUsageLimitCommandOutput
See
input
shape.response
shape.config
shape.Throws
ClusterNotFoundFault (client fault)
The
ClusterIdentifier
parameter does not refer to an existing cluster.Throws
InvalidClusterStateFault (client fault)
The specified cluster is not in the
available
state.Throws
InvalidUsageLimitFault (client fault)
The usage limit is not valid.
Throws
LimitExceededFault (client fault)
The encryption key has exceeded its grant limit in Amazon Web Services KMS.
Throws
TagLimitExceededFault (client fault)
You have exceeded the number of tags allowed.
Throws
UnsupportedOperationFault (client fault)
The requested operation isn't supported.
Throws
UsageLimitAlreadyExistsFault (client fault)
The usage limit already exists.
Throws
RedshiftServiceException
Base exception class for all service exceptions from Redshift service.