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/async_dax.py
| async def delete_subnet_group(
self,
subnet_group_name: "capo_dax.types.string.String",
*,
config_overrides: Optional[AsyncDAXClientConfig] = 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.
"""
async def _handler(
req: "AsyncOperationRequest[capo_dax.types.delete_subnet_group_request.DeleteSubnetGroupRequest]",
) -> AsyncOperationResponse[
"capo_dax.types.delete_subnet_group_response.DeleteSubnetGroupResponse"
]:
import capo_dax._operations.amazon_daxv3.delete_subnet_group
(
output,
http_response,
) = await capo_dax._operations.amazon_daxv3.delete_subnet_group.async_delete_subnet_group(
req.options, req.input
)
return AsyncOperationResponse(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 = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|