> ## Documentation Index
> Fetch the complete documentation index at: https://datum-4926dda5-docs-api-reference-demo.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# ServiceEntitlement

> ServiceEntitlement is the Schema for the serviceentitlements API.

<Note>
  **Platform-provided resource.** Datum operates this resource; you typically reference or read it rather than create it. See [Platform resources](/api/platform/overview).
</Note>

<Note>
  API resource reference for **ServiceEntitlement**, part of the platform service catalog. See [Platform resources](/api/platform/overview) for the full catalog. To create or change one, see [Changing resources](/datumctl/resources/changing); to inspect, see [Reading resources](/datumctl/resources/reading).
</Note>

<Warning>
  This resource is part of the `v1alpha1` API and is subject to change. Fields and behavior may change in future releases.
</Warning>

## Identity

|         |                         |
| ------- | ----------------------- |
| Group   | `services.miloapis.com` |
| Version | `v1alpha1`              |
| Kind    | `ServiceEntitlement`    |
| Scope   | Platform                |

## Overview

A `ServiceEntitlement` records a consumer project's intent to use a specific Datum Cloud service. A project admin creates one `ServiceEntitlement` per service they want to enable. The object is written into the consumer project's control plane, and the services operator reconciles it into the provider project so the requested service becomes available.

Some services require provider approval before they become active; for those, you can include a human-readable message with your request. Entitlements can also be created automatically when one service depends on another.

## Spec fields

| Field                  | Type   | Required | Description                                                                              |
| ---------------------- | ------ | -------- | ---------------------------------------------------------------------------------------- |
| `spec.serviceRef`      | Object | Yes      | Identifies the Service the consumer project wants to enable.                             |
| `spec.serviceRef.name` | string | Yes      | The name of the referenced Service.                                                      |
| `spec.requestMessage`  | string | No       | Optional human-readable message sent to the provider when the service requires approval. |

## Status fields (read-only)

| Field                       | Type      | Description                                                                                                                                          |
| --------------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| `status.phase`              | string    | Controller-observed lifecycle state: `PendingApproval`, `Active`, or `Rejected`.                                                                     |
| `status.origin`             | string    | Whether this entitlement was created directly by a consumer admin (`Direct`) or automatically as a dependency of another entitlement (`Dependency`). |
| `status.serviceName`        | string    | Canonical service identifier resolved from `spec.serviceRef` (e.g., `compute.datumapis.com`), set by the controller on first successful reconcile.   |
| `status.entitledAt`         | string    | The time at which this entitlement became Active.                                                                                                    |
| `status.dependencyOf`       | string    | The `metadata.name` of the ServiceEntitlement that caused this entitlement to be created when origin is `Dependency`.                                |
| `status.observedGeneration` | integer   | The most recent generation observed by the controller.                                                                                               |
| `status.conditions`         | \[]Object | Latest available observations of the entitlement's state.                                                                                            |

## Usage

```yaml theme={null}
apiVersion: services.miloapis.com/v1alpha1
kind: ServiceEntitlement
metadata:
  name: compute-datumapis-com
spec:
  serviceRef:
    name: compute.datumapis.com
  requestMessage: "Enabling compute for the production workloads project."
```

```bash theme={null}
datumctl apply -f serviceentitlement.yaml --project my-project
datumctl get serviceentitlements --project my-project
datumctl describe serviceentitlement compute-datumapis-com --project my-project
```

<Tip>
  Run `datumctl explain serviceentitlements --recursive` to see the full, live field tree for this resource.
</Tip>
