# REST Resource: projects.locations.applications.services

- [Resource: Service](https://docs.cloud.google.com/app-hub/docs/reference/rest/v1alpha/projects.locations.applications.services#Service)
  - [JSON representation](https://docs.cloud.google.com/app-hub/docs/reference/rest/v1alpha/projects.locations.applications.services#Service.SCHEMA_REPRESENTATION)
- [State](https://docs.cloud.google.com/app-hub/docs/reference/rest/v1alpha/projects.locations.applications.services#State)
- [Methods](https://docs.cloud.google.com/app-hub/docs/reference/rest/v1alpha/projects.locations.applications.services#METHODS_SUMMARY)

## Resource: Service

Service is an App Hub data model that contains a discovered service, which represents a network or API interface that exposes some functionality to clients for consumption over the network.

| JSON representation |
|---|
| ``` { "name": string, "displayName": string, "description": string, "serviceReference": { object (`https://docs.cloud.google.com/app-hub/docs/reference/rest/v1alpha/ServiceReference`) }, "serviceProperties": { object (`https://docs.cloud.google.com/app-hub/docs/reference/rest/v1alpha/ServiceProperties`) }, "attributes": { object (`https://docs.cloud.google.com/app-hub/docs/reference/rest/v1alpha/Attributes`) }, "discoveredService": string, "createTime": string, "updateTime": string, "uid": string, "state": enum (`https://docs.cloud.google.com/app-hub/docs/reference/rest/v1alpha/projects.locations.applications.services#State`) } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. The resource name of a Service. Format: `"projects/{host-project-id}/locations/{location}/applications/{application-id}/services/{service-id}"` |
| `displayName` | `string` Optional. User-defined name for the Service. Can have a maximum length of 63 characters. |
| `description` | `string` Optional. User-defined description of a Service. Can have a maximum length of 2048 characters. |
| `serviceReference` | ``object (`https://docs.cloud.google.com/app-hub/docs/reference/rest/v1alpha/ServiceReference`)`` Output only. Reference to an underlying networking resource that can comprise a Service. These are immutable. |
| `serviceProperties` | ``object (`https://docs.cloud.google.com/app-hub/docs/reference/rest/v1alpha/ServiceProperties`)`` Output only. Properties of an underlying compute resource that can comprise a Service. These are immutable. |
| `attributes` | ``object (`https://docs.cloud.google.com/app-hub/docs/reference/rest/v1alpha/Attributes`)`` Optional. Consumer provided attributes. |
| `discoveredService` | `string` Required. Immutable. The resource name of the original discovered service. |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. Create time. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `updateTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. Update time. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `uid` | `string` Output only. A universally unique identifier (UUID) for the `Service` in the UUID4 format. |
| `state` | ``enum (`https://docs.cloud.google.com/app-hub/docs/reference/rest/v1alpha/projects.locations.applications.services#State`)`` Output only. Service state. |

## State

Service state.

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | Unspecified state. |
| `CREATING` | The service is being created. |
| `ACTIVE` | The service is ready. |
| `DELETING` | The service is being deleted. |
| `DETACHED` | The underlying networking resources have been deleted. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/app-hub/docs/reference/rest/v1alpha/projects.locations.applications.services/create` | Creates a Service in an Application. |
| ### `https://docs.cloud.google.com/app-hub/docs/reference/rest/v1alpha/projects.locations.applications.services/delete` | Deletes a Service from an Application. |
| ### `https://docs.cloud.google.com/app-hub/docs/reference/rest/v1alpha/projects.locations.applications.services/get` | Gets a Service in an Application. |
| ### `https://docs.cloud.google.com/app-hub/docs/reference/rest/v1alpha/projects.locations.applications.services/list` | Lists Services in an Application. |
| ### `https://docs.cloud.google.com/app-hub/docs/reference/rest/v1alpha/projects.locations.applications.services/patch` | Updates a Service in an Application. |