Deletes a subnet group.
You cannot delete a subnet group if it is associated with any DAX clusters.
Parameters:
-
subnet_group_name
(String)
–
The name of the subnet group to delete.
Raises:
Source code in docs_src/capo_dax/_services/dax.py
| def delete_subnet_group(
self,
subnet_group_name: "capo_dax.types.string.String",
*,
config_overrides: Optional[DAXClientConfig] = None,
) -> "capo_dax.types.delete_subnet_group_response.DeleteSubnetGroupResponse":
"""<p>Deletes a subnet group.</p> <note> <p>You cannot delete a subnet group if it is associated with any DAX clusters.</p> </note>
Args:
subnet_group_name: <p>The name of the subnet group to delete.</p>
Raises:
capo_dax.errors.service_linked_role_not_found_fault.ServiceLinkedRoleNotFoundFault: <p>The specified service linked role (SLR) was not found.</p>
capo_dax.errors.subnet_group_in_use_fault.SubnetGroupInUseFault: <p>The specified subnet group is currently in use.</p>
capo_dax.errors.subnet_group_not_found_fault.SubnetGroupNotFoundFault: <p>The requested subnet group name does not refer to an existing subnet group.</p>
capo_dax.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_dax.types.delete_subnet_group_request.DeleteSubnetGroupRequest]",
) -> OperationResponse[
"capo_dax.types.delete_subnet_group_response.DeleteSubnetGroupResponse"
]:
import capo_dax._operations.amazon_daxv3.delete_subnet_group
output, http_response = (
capo_dax._operations.amazon_daxv3.delete_subnet_group.delete_subnet_group(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteSubnetGroup")
)
input_: capo_dax.types.delete_subnet_group_request.DeleteSubnetGroupRequest = {
"subnet_group_name": subnet_group_name
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|