Deletes a DB subnet group.
The specified database subnet group must not be associated with any DB instances.
Parameters:
-
db_subnet_group_name
(Optional[String], default:
None
)
–
The name of the database subnet group to delete.
You can't delete the default subnet group.
Constraints:
Constraints: Must match the name of an existing DBSubnetGroup. Must not be default.
Example: mySubnetgroup
Raises:
Source code in docs_src/capo_neptune/_services/async_neptune.py
| async def delete_db_subnet_group(
self,
*,
config_overrides: Optional[AsyncNeptuneClientConfig] = None,
db_subnet_group_name: Optional["capo_neptune.types.string.String"] = None,
) -> None:
"""<p>Deletes a DB subnet group.</p> <note> <p>The specified database subnet group must not be associated with any DB instances.</p> </note>
Args:
db_subnet_group_name: <p>The name of the database subnet group to delete.</p> <note> <p>You can't delete the default subnet group.</p> </note> <p>Constraints:</p> <p>Constraints: Must match the name of an existing DBSubnetGroup. Must not be default.</p> <p>Example: <code>mySubnetgroup</code> </p>
Raises:
capo_neptune.errors.db_subnet_group_not_found_fault.DBSubnetGroupNotFoundFault: <p> <i>DBSubnetGroupName</i> does not refer to an existing DB subnet group.</p>
capo_neptune.errors.invalid_db_subnet_group_state_fault.InvalidDBSubnetGroupStateFault: <p>The DB subnet group cannot be deleted because it is in use.</p>
capo_neptune.errors.invalid_db_subnet_state_fault.InvalidDBSubnetStateFault: <p>The DB subnet is not in the <i>available</i> state.</p>
capo_neptune.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_neptune.types.delete_db_subnet_group_message.DeleteDBSubnetGroupMessage]",
) -> AsyncOperationResponse[None]:
import capo_neptune._operations.amazon_rd_sv19.delete_db_subnet_group
(
output,
http_response,
) = await capo_neptune._operations.amazon_rd_sv19.delete_db_subnet_group.async_delete_db_subnet_group(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteDBSubnetGroup")
)
input_: capo_neptune.types.delete_db_subnet_group_message.DeleteDBSubnetGroupMessage = {}
if db_subnet_group_name is not None:
input_["db_subnet_group_name"] = db_subnet_group_name
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|