searchPrincipals
Searches Identity Center for users and groups in a domain. The domain must be configured with Identity Center. To grant access to a result, pass its principalId to CreateAccessGrant with a principalType of IDC_USER for a user or IDC_GROUP for a group.
Samples
// The following example searches a domain for principals whose name matches a text query. A text
// search (any searchQuery other than *) returns at most 10 results and does not paginate, so maxResults and
// nextToken are not supplied and no nextToken is returned. To grant access to a result, pass its principalId to
// CreateAccessGrant with a principalType of IDC_USER for a user or IDC_GROUP for a group. Payloads are shown as JSON on
// the wire they are CBOR encoded.
val resp = cloudWatchOmniClient.searchPrincipals {
domainId = "d-1a2b3c4d5e"
searchQuery = "jane"
}Content copied to clipboard