- 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.
DeleteCacheSubnetGroupCommand
Deletes a cache subnet group.
You cannot delete a default cache subnet group or one that is associated with any clusters.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { ElastiCacheClient, DeleteCacheSubnetGroupCommand } from "@aws-sdk/client-elasticache"; // ES Modules import
// const { ElastiCacheClient, DeleteCacheSubnetGroupCommand } = require("@aws-sdk/client-elasticache"); // CommonJS import
// import type { ElastiCacheClientConfig } from "@aws-sdk/client-elasticache";
const config = {}; // type is ElastiCacheClientConfig
const client = new ElastiCacheClient(config);
const input = { // DeleteCacheSubnetGroupMessage
CacheSubnetGroupName: "STRING_VALUE", // required
};
const command = new DeleteCacheSubnetGroupCommand(input);
const response = await client.send(command);
// {};
Example Usage
Loading code editor
DeleteCacheSubnetGroupCommand Input
See DeleteCacheSubnetGroupCommandInput for more details
Parameter | Type | Description |
|---|
Parameter | Type | Description |
|---|---|---|
CacheSubnetGroupNameRequired | string | undefined | The name of the cache subnet group to delete. Constraints: Must contain no more than 255 alphanumeric characters or hyphens. |
DeleteCacheSubnetGroupCommand Output
See DeleteCacheSubnetGroupCommandOutput for details
Parameter | Type | Description |
|---|
Parameter | Type | Description |
|---|---|---|
$metadataRequired | ResponseMetadata | Metadata pertaining to this request. |
Throws
Name | Fault | Details |
|---|
Name | Fault | Details |
|---|---|---|
| CacheSubnetGroupInUse | client | The requested cache subnet group is currently in use. |
| CacheSubnetGroupNotFoundFault | client | The requested cache subnet group name does not refer to an existing cache subnet group. |
| ElastiCacheServiceException | Base exception class for all service exceptions from ElastiCache service. |