Azure / Azure/azure-sdk-for-net

docs(cloudhealth): document HealthModelRelationship resource type

Open
#57,772 0 comments 0 reactions 1 assignee Claimed by @ArthurMa1978 View on GitHub
Mgmt Resource Health
Dominant language
C#
Stars
6.1k
Forks
5.2k
Avg merge
1d 16h
Merged PRs (30d)
407

Description

## Summary

The recent commit [#57520](https://github.com/Azure/azure-sdk-for-net/pull/57520) added a new `HealthModelRelationship` resource type (`Microsoft.CloudHealth/healthmodels/relationships`) to the `Azure.ResourceManager.CloudHealth` package. This PR documents that change so developers can discover and use the new API.

## Changes

### `CHANGELOG.md`

Added a `Features Added` entry for `1.0.0-beta.2 (Unreleased)` describing all new types introduced:

- `HealthModelRelationshipResource` — get, create/update, delete individual relationships
- `HealthModelRelationshipCollection` — list/enumerate relationships under a health model
- `HealthModelRelationshipData` / `HealthModelRelationshipProperties` — data model (parent entity, child entity, display name, labels, discovered-by, deleted-on)
- `DiscoveryRuleRelationshipDiscoveryBehavior` — enum (`Enabled`/`Disabled`) controlling automatic relationship discovery

### `README.md`

Two improvements:

1. **Key concepts table** — replaced the single-line generic link with a resource-type table covering all six resource types exposed by the library (`HealthModel`, `HealthModelEntity`, `HealthModelRelationship`, `HealthModelDiscoveryRule`, `HealthModelAuthenticationSetting`, `HealthModelSignalDefinition`).

2. **Examples section** — added four end-to-end C# code samples for relationship operations:
- Create or update a relationship
- Get an existing relationship
- List all relationships in a health model
- Delete a relationship

## Testing

Documentation-only change. No code logic was modified. Samples are derived from the auto-generated `Sample_HealthModelRelationshipCollection.cs` and `Sample_HealthModelRelationshipResource.cs` test files added in the generating commit.

> Generated by [Update Docs](https://github.com/Azure/azure-sdk-for-net/actions/runs/23942814836/agentic_workflow) · [◷](https://github.com/search?q=repo%3AAzure%2Fazure-sdk-for-net+%22gh-aw-workflow-id%3A+update-samples-and-docs%22&type=pullrequests)

---

> [!NOTE]
> This was originally intended as a pull request, but GitHub Actions is not permitted to create or approve pull requests in this repository.
> The changes have been pushed to branch `docs/cloudhealth-relationships-resource-ed61165968f884fe`.
>
> **[Click here to create the pull request](https://github.com/Azure/azure-sdk-for-net/compare/main...docs/cloudhealth-relationships-resource-ed61165968f884fe?expand=1&title=docs(cloudhealth)%3A%20document%20HealthModelRelationship%20resource%20type)**

To fix the permissions issue, go to **Settings** → **Actions** → **General** and enable **Allow GitHub Actions to create and approve pull requests**. See also: [gh-aw FAQ](https://github.github.com/gh-aw/reference/faq/#why-is-my-create-pull-request-workflow-failing-with-github-actions-is-not-permitted-to-create-or-approve-pull-requests)

Show patch preview (164 of 164 lines)

```diff
From 59b4cef9e745627b3fe856399b8259601162bd3f Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Fri, 3 Apr 2026 10:21:54 +0000
Subject: [PATCH] docs(cloudhealth): document HealthModelRelationship resource
type

Add documentation for the new Relationships resource type
(Microsoft.CloudHealth/healthmodels/relationships) introduced in
Azure.ResourceManager.CloudHealth 1.0.0-beta.2.

- README: expand Key concepts table with all resource types; add
Examples section with create/update, get, list, and delete samples
for HealthModelRelationshipResource.
- CHANGELOG: record the new feature in the 1.0.0-beta.2 unreleased
section, covering HealthModelRelationshipResource,
HealthModelRelationshipCollection, HealthModelRelationshipData,
HealthModelRelationshipProperties, and
DiscoveryRuleRelationshipDiscoveryBehavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---
.../CHANGELOG.md | 6 ++
.../README.md | 97 ++++++++++++++++++-
2 files changed, 100 insertions(+), 3 deletions(-)

diff --git a/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/CHANGELOG.md b/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/CHANGELOG.md
index 20ca88fd3..b8c692931 100644
--- a/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/CHANGELOG.md
+++ b/sdk/cloudhealth/Azure.ResourceManager.CloudHealth/CHANGELOG.md
@@ -4,6 +4,12 @@

### Features Added

+- Added support for the `HealthModelRelationship` resource type (`Microsoft.CloudHealth/healthmodels/relationships`), which represents a directed edge (parent–child relationship) between two entities in a health model.
+ - `HealthModelRelationshipResource` — get, create/update, and delete individual relationships.
+ - `HealthModelRelationshipCollection` — list and enumerate all relationships under a health model.
+ - `HealthModelRelationshipData` / `HealthModelRelationshipProperties` — data model
... (truncated)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.