Adopt a discovered target-local account for an identity. Adoption is full adoption: Principal creates a policy from operator-confirmed rules and manages credentials for the adopted account.
Parameters
Target ID (UUID)
Request body application/json · AdoptTargetAccountRequest
8 fields
postgresmysqlkubernetesclickhousemongodbServiceAccountUserGroupAuthentication database of a MongoDB user
Discriminated by mode. When mode=existing, only identity_id is read. When mode=create_static, external_id and display_name are required and the server creates a service-kind identity carrying adoption metadata before linking the target account.
5 fields
existingcreate_static Existing identity to map to. Required when mode=existing.
External id for the new static identity. Required when mode=create_static.
Human-readable label for the new static identity. Required when mode=create_static.
Optional description for the new static identity.
Confirmed rows. On PostgreSQL a row identical to a previewed one is imported, any other is the rule's own.
2 fields
principal_managed Memberships the operator confirmed from the preview (PostgreSQL). An absent field takes over every live membership of the account. An empty array takes over none.
4 fields
Parent role the account is a member of.
Responses
Existing adoption returned
TargetAccountLinkResponse · 11 fields
8 fields
9 fields
unmanagedprincipal_created adoptedorphanedexternalprincipal_managed unknown4 fields
Human label of the identity. Empty when the identity has no human name.
4 fields
Human label of the identity. Empty when the identity has no human name.
The rule that created a Principal-created account.
3 fields
Canonical display name of the rule. Empty when the rule was deleted.
True when the target no longer has the rule.
Whether Principal recorded the account instance it created or adopted. Set only for PostgreSQL and MongoDB accounts Principal created or adopted. Principal removes the account, revokes its access or changes its password only when it is verified. Mismatch means the account was recreated outside Principal.
verifiedunverifiedmismatchHow Principal recorded the account instance: created right after it created the account, adopted from discovery at adoption, or observed by the first discovery or apply that saw it.
createdadoptedobservedAccount adopted
TargetAccountLinkResponse · 11 fields
8 fields
9 fields
unmanagedprincipal_created adoptedorphanedexternalprincipal_managed unknown4 fields
Human label of the identity. Empty when the identity has no human name.
4 fields
Human label of the identity. Empty when the identity has no human name.
The rule that created a Principal-created account.
3 fields
Canonical display name of the rule. Empty when the rule was deleted.
True when the target no longer has the rule.
Whether Principal recorded the account instance it created or adopted. Set only for PostgreSQL and MongoDB accounts Principal created or adopted. Principal removes the account, revokes its access or changes its password only when it is verified. Mismatch means the account was recreated outside Principal.
verifiedunverifiedmismatchHow Principal recorded the account instance: created right after it created the account, adopted from discovery at adoption, or observed by the first discovery or apply that saw it.
createdadoptedobservedThe account can't be adopted: among other conflicts, a cut-off password change of the identity's own account on the target waits for a check (rotation.check_required), and the account to adopt may be that same account. Check the change on the identity's credentials card first.
Common errors: 400 401 403 404 413 429 503 504. They mean the same for every operation, see Errors.