# Service Resources Service resources are services of a Hadoop cluster (e.g. HDFS, MapReduce and Ganglia). Service resources are sub-resources of clusters. ###API Summary - [List services](services.md) - [View service information](services-service.md) - [Create service](create-service.md) - [Update services](update-services.md) - [Update service](update-service.md) ###Properties
Property Description
ServiceInfo/service_name The service name
ServiceInfo/cluster_name The parent cluster name
ServiceInfo/state The current state of the service
ServiceInfo/desired_configs The desired configurations
###States The current state of a service resource can be determined by looking at the ServiceInfo/state property. GET api/v1/clusters/c1/services/HDFS?fields=ServiceInfo/state 200 OK { "href" : "http://your.ambari.server/api/v1/clusters/c1/services/HDFS?fields=ServiceInfo/state", "ServiceInfo" : { "cluster_name" : "c1", "state" : "INSTALLED", "service_name" : "HDFS" } } The following table lists the possible values of the service resource ServiceInfo/state property.
State Description
INIT The initial clean state after the service is first created.
INSTALLING In the process of installing the service.
INSTALL_FAILED The service install failed.
INSTALLED The service has been installed successfully but is not currently running.
STARTING In the process of starting the service.
STARTED The service has been installed and started.
STOPPING In the process of stopping the service.
UNINSTALLING In the process of uninstalling the service.
UNINSTALLED The service has been successfully uninstalled.
WIPING_OUT In the process of wiping out the installed service.
UPGRADING In the process of upgrading the service.
MAINTENANCE The service has been marked for maintenance.
UNKNOWN The service state can not be determined.
###Starting a Service A service can be started through the API by setting its state to be STARTED (see [update service](update-service.md)). ###Stopping a Service A service can be stopped through the API by setting its state to be INSTALLED (see [update service](update-service.md)).