Jump to Content

This API Documentation is now deprecated

We are excited to announce our new API Documentation.

Class CreateUsageLimitCommandProtected

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.

import { RedshiftClient, CreateUsageLimitCommand } from "@aws-sdk/client-redshift"; // ES Modules import
// const { RedshiftClient, CreateUsageLimitCommand } = require("@aws-sdk/client-redshift"); // CommonJS import
const 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",
// },
// ],
// };

Param

CreateUsageLimitCommandInput

Returns

CreateUsageLimitCommandOutput

See

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.

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

Methods