- 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.
DeleteDBSubnetGroupCommand
Deletes a subnet group.
The specified database subnet group must not be associated with any DB instances.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { DocDBClient, DeleteDBSubnetGroupCommand } from "@aws-sdk/client-docdb"; // ES Modules import
// const { DocDBClient, DeleteDBSubnetGroupCommand } = require("@aws-sdk/client-docdb"); // CommonJS import
const client = new DocDBClient(config);
const input = { // DeleteDBSubnetGroupMessage
DBSubnetGroupName: "STRING_VALUE", // required
};
const command = new DeleteDBSubnetGroupCommand(input);
const response = await client.send(command);
// {};
DeleteDBSubnetGroupCommand Input
See DeleteDBSubnetGroupCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
DBSubnetGroupName Required | string | undefined | The name of the database subnet group to delete. You can't delete the default subnet group. Constraints: Must match the name of an existing Example: |
DeleteDBSubnetGroupCommand Output
See DeleteDBSubnetGroupCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
DBSubnetGroupNotFoundFault | client | |
InvalidDBSubnetGroupStateFault | client | The subnet group can't be deleted because it's in use. |
InvalidDBSubnetStateFault | client | The subnet isn't in the available state. |
DocDBServiceException | Base exception class for all service exceptions from DocDB service. |