# GetClass CIM Operation

The `GetClass` CIM Operation returns a single CIM Class from the target Namespace where the ClassName input parameter defines the name of the class to be retrieved.

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

ClassName Defines the name of the Class to be retrieved. See Enumerate Class Names for a list of classes.

LocalOnly If true only CIM Elements overridden within definition of class are returned. Default is true.

IncludeQualifiers If checked, show Qualifiers for class and returned Properties, Methods, and Method Parameters. Default is false.

IncludeClassOrigins If checked (TRUE), CLASSORIGIN attribute will be returned for all appropriate elements. Default is false.

PropertyList Null or array of property names to filter request. See below.

## RETURN Results

If successful, the return value is a single CIM Class.If unsuccessful, one of the CIM status codes show below 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_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized or otherwise incorrect parameters)
- CIM_ERR_ACCESS_DENIED
- CIM_ERR_INVALID_CLASS (the CIM Class does not exist in the specified namespace)
- CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM Instance does not exist in the specified namespace)
- CIM_ERR_FAILED (some other unspecified error occurred)

## ADDITIONAL Description of Fields

LocalOnly - If the `LocalOnly` input parameter is true, this specifies that only CIM Elements (properties, methods and qualifiers) overriden within the definition of the Class are returned. If false, all elements are returned. This parameter therefore effects a CIM Server-side mechanism to filter certain elements of the returned object based on whether or not they have been propagated from the parent Class (as defined by the PROPAGATED attribute).

IncludeQualifiers - If the `IncludeQualifiers` input parameter is true, this specifies that all Qualifiers for that Class (including Qualifiers on the Class and on any returned Properties, Methods or Method Parameters) MUST be included as <QUALIFIER> elements in the response. If false no QUALIFIER elements are present in the returned Class.

IncludeClassOrigins - If the `IncludeClassOrigin` input parameter is true, this specifies that the CLASSORIGIN attribute MUST be present on all appropriate elements in the returned Class. If false, no CLASSORIGIN attributes are present in the returned Class.

PropertyList - If the `PropertyList` input parameter is not NULL, the members of the array define one or more Property names. The returned Class MUST NOT include elements for any Properties missing from this list. Note that if `LocalOnly` is specified as true this acts as an additional filter on the set of Properties returned (for example, if Property A is included in the `PropertyList` but `LocalOnly` is set to true and A is not local to the requested Class, then it will not be included in the response). If the `PropertyList` input parameter is an empty array this signifies that no Properties are included in the response. If the PropertyList input parameter is NULL this specifies that all Properties (subject to the conditions expressed by the other parameters) are included in the response.

If the `PropertyList` contains duplicate elements, the Server MUST ignore the duplicates but otherwise process the request normally. If the PropertyList contains elements which are invalid Property names for the target Class, the Server MUST ignore such entries but otherwise process the request normally.

## C++ Pegasus API

        virtual CIMClass getClass(
    		const String& nameSpace,
    		const String& className,
    		Boolean localOnly = true,
    		Boolean includeQualifiers = true,
    		Boolean includeClassOrigin = false,
    		const CIMPropertyList& propertyList = CIMPropertyList());

Demonstration Prepared by the OpenGroup Manageability Work Group Pegasus Development Team

See (http://www.opengroup.org/management) for more information on Pegasus

Last Modified Wednesday, January 30, 2002 12:55:08 PM Copyright @ The Open Group 2001