HomeGuidesAPI Reference
CommunityWebsiteDocumentationExchangeSupportDeveloper
API Reference

Update an Affinity Group

Update a specific affinity group by its ID, regardless of whether it is scoped to a cluster or a cloud.
A rule is either a legacy VM-to-VM rule (servers populated) or a combined VM-to-Host rule (vmGroup and hostGroup populated). Sending both shapes, or only one half of a combined rule, is rejected with a 400.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
int64
required

Morpheus ID of the Object being referenced

Body Params
affinityGroup
object

Update payload for an affinity group. Send either servers (legacy VM-to-VM rule) or both vmGroup and hostGroup (combined VM-to-Host rule) — never both shapes at once.

tenantPermissions
object
Responses

errors is keyed by the request field that failed, and each value is a stable
i18n message code. msg carries the human-readable text for the same failure.

A rule must be exactly one of two shapes — a legacy VM-to-VM rule that lists
servers, or a combined VM-to-Host rule that references both a vmGroup and
a hostGroup. Sending both shapes, or only one half of a combined rule, is
rejected here. The same mutual exclusion is enforced a second time at the
domain layer under the code affinityGroup.ruleShape.invalid.

Language
Credentials
Bearer
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json