# CloudWatch Observability Admin Floci implements the REST JSON API of CloudWatch Observability Admin for the resource tags for telemetry feature, which CloudWatch's OpenTelemetry enrichment reads resource tags through. Requests are signed for `observabilityadmin` and served at the same endpoint as every other service. ## Supported Actions | Action | Description | | --- | --- | | `StartTelemetryEnrichment` | Starts resource tags for telemetry in the Region, creating its Resource Explorer managed view the first time. | | `StopTelemetryEnrichment` | Stops resource tags for telemetry in the Region. | | `GetTelemetryEnrichmentStatus` | Returns the feature's status, and its managed view's ARN while it runs. | ## Behavior - The feature is one switch per account and Region. `StartTelemetryEnrichment` answers `202` with `Status` `Running` and the ARN of its Resource Explorer managed view, `StopTelemetryEnrichment` answers `202` with `Status` `Stopped`, and `GetTelemetryEnrichmentStatus` answers the current `Status` with the view's ARN while the feature runs, as the output's documentation gives it "if the feature is enabled". - Starting the feature has Resource Explorer create "an AWS index and managed view that indexes and discovers resources and tags in your account", as the CloudWatch user guide's "Resource tags for telemetry" says. The index is a `LOCAL` one, created only when the Region has none, and the view includes the `tags` property. `resource-explorer-2` serves the view: `GetManagedView` answers it and `ListManagedViews` lists it. - AWS documents the view but not its name, so Floci names it `AWSManagedViewForResourceTagsForTelemetry`, in the form of the one managed view the Resource Explorer guide names, `AWSManagedViewForSSM`. Its ARN is `arn::resource-explorer-2:::managed-view/AWSManagedViewForResourceTagsForTelemetry/`. Its `TrustedService` is `telemetry-enablement.observabilityadmin.amazonaws.com`, the principal of the service-linked role whose policy (`AWSObservabilityAdminTelemetryEnablementServiceRolePolicy`) grants the feature `resource-explorer-2:CreateManagedView`. - The view outlives a stop: a feature stopped and started again answers the view its first start created. - CloudWatch's `StartOTelEnrichment` with resource tag enrichment needs the feature running in the same Region; see [OTel enrichment](cloudwatch.md#otel-enrichment). Stopping the feature leaves CloudWatch enrichment that already runs as it is. - `GetTelemetryEnrichmentStatus` for a feature never started in the Region answers `ResourceNotFoundException` (404), the operation's modeled answer before the first start. Stopping a feature that is stopped, or was never started, answers `Stopped` and changes nothing, so a feature never started still reads as never started. - CloudFormation's `AWS::ObservabilityAdmin::TelemetryEnrichment` starts the feature in the stack's Region when it is created and stops it when it is deleted. `Scope` must be `ACCOUNT`, the only value AWS supports; `Ref` returns it and `Status` returns `RUNNING`. A create while the feature already runs fails with `AlreadyExists`, as CloudFormation's resource handler contract requires of a create. - Floci changes the feature's state at once, so it is never caught between `Running` and `Stopped`, is never `Impaired`, and no request answers `ConflictException`. ## IAM Under IAM enforcement (`floci.services.iam.enforcement-enabled`), each request is checked as its `observabilityadmin:` action, from the routes and request resources generated from botocore and the AWS Service Reference. The three actions act on no resource type and are checked on `*`. A refusal is `AccessDeniedException` with the 400 status the model declares for the service. ## Not implemented Telemetry rules, telemetry evaluation, centralization rules, telemetry pipelines, S3 table integrations, dataset integrations, third-party telemetry enrichment and resource telemetry listing are not emulated yet. Starting the feature does not grant Resource Explorer streaming access to a service. ## Example ```bash export AWS_ENDPOINT_URL=http://localhost:4566 aws observabilityadmin start-telemetry-enrichment aws observabilityadmin get-telemetry-enrichment-status aws resource-explorer-2 get-managed-view --managed-view-arn "$(aws observabilityadmin \ get-telemetry-enrichment-status --query AwsResourceExplorerManagedViewArn --output text)" aws observabilityadmin stop-telemetry-enrichment ``` See the [CloudWatch Observability Admin API Reference](https://docs.aws.amazon.com/cloudwatch/latest/observabilityadmin/Welcome.html).