# DeleteClass CIM Operation

This deleteClass CIM Operation deletes a single Class from the target Namespace

NameSpace String that defines the target namespace. See NameSpace Operations for more information

ClassName Name of the class to be deleted

## Additional Information

The `DeleteClass` method deletes a single CIM Class from the target Namespace.

NameSpace The nameSpace parameter is a string that defines the target namespace.

ClassName The `className` input parameter defines the name of the Class to be deleted.

## Return

If successful, the specified Class (including any subclasses and any instances) MUST have been removed by the CIM Server. The operation MUST fail if any one of these objects cannot be deleted. If unsuccessful, one of the following status codes MUST be returned by this method, where the first applicable error in the list (starting with the first element of the list, and working down) is the error returned. Any additional method-specific interpretation of the error in is given in parentheses.

- CIM_ERR_ACCESS_DENIED
- CIM_ERR_NOT_SUPPORTED
- CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized or otherwise incorrect parameters)
- CIM_ERR_NOT_FOUND (the CIM Class to be deleted does not exist)
- CIM_ERR_CLASS_HAS_CHILDREN (the CIM Class has one or more subclasses which cannot be deleted)
- CIM_ERR_CLASS_HAS_INSTANCES (the CIM Class has one or more instances which cannot be deleted)
- CIM_ERR_FAILED (some other unspecified error occurred)

## C++ API

        virtual void deleteClass(
            const String& nameSpace,
            const String& className) = 0;