Skip to main content

io.enterpriseai.resources.MembersClient

Source: sdks/java/enterprise-ai-java/src/main/java/io/enterpriseai/resources/MembersClient.java. Back to the Java SDK reference index.

note

This page is generated by tools/docs/gen_sdk_reference.py from the SDK sources and the OpenAPI text folders. Do not edit it by hand: change the source and regenerate.

Class MembersClient​

Tenant members and role assignment.

Constructor MembersClient​

MembersClient(Transport transport)

Creates the client on the shared transport; EnterpriseAIClient builds it and exposes it through the accessor of the same name.

NameTypeDefaultRequiredDescription
transportTransportyesTransport shared by the sub-clients of one client.

MembersClient.create​

JsonNode create(Object body)

Add a member. Gives a user (OIDC subject) a role and a clearance in the tenant, or in one project with project_id. The user record is created when unknown; an existing membership for the same user and project is updated. Needs tenant_admin; granting platform_admin needs a platform administrator (403 forbidden). Writes the audit event member.assign.

Route: /v1/members (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesUser, role, clearance and optional project of the membership.

Returns: JsonNode. Decoded JSON answer of the operation "Add a member".

Raises: the typed errors of the transport (Errors).

MembersClient.create​

JsonNode create(Object body, RequestOptions options)

Add a member. Gives a user (OIDC subject) a role and a clearance in the tenant, or in one project with project_id. The user record is created when unknown; an existing membership for the same user and project is updated. Needs tenant_admin; granting platform_admin needs a platform administrator (403 forbidden). Writes the audit event member.assign.

Route: /v1/members (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesUser, role, clearance and optional project of the membership.
optionsRequestOptionsyesPer call options (idempotency key, traceparent, headers, abort signal).

Returns: JsonNode. Decoded JSON answer of the operation "Add a member".

Raises: the typed errors of the transport (Errors).

MembersClient.createGroupMapping​

JsonNode createGroupMapping(Object body)

Create a group mapping. Maps a directory group to a project role and, optionally, a quota profile. Needs tenant_admin.

Route: /v1/identity/group-mappings (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesGroup, project, role and optional quota profile of the mapping.

Returns: JsonNode. Decoded JSON answer of the operation "Create a group mapping".

Raises: the typed errors of the transport (Errors).

MembersClient.createGroupMapping​

JsonNode createGroupMapping(Object body, RequestOptions options)

Create a group mapping. Maps a directory group to a project role and, optionally, a quota profile. Needs tenant_admin.

Route: /v1/identity/group-mappings (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesGroup, project, role and optional quota profile of the mapping.
optionsRequestOptionsyesPer call options (idempotency key, traceparent, headers, abort signal).

Returns: JsonNode. Decoded JSON answer of the operation "Create a group mapping".

Raises: the typed errors of the transport (Errors).

MembersClient.createQuotaProfile​

JsonNode createQuotaProfile(Object body)

Create a quota profile. Creates a reusable quota profile for group mappings. Needs tenant_admin. At least one of limit_cost and limit_tokens is required (422 validation_error). A name already used answers 409 conflict. Writes the audit event identity.quota_profile.create.

Route: /v1/identity/quota-profiles (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesName, period, enforcement and limits of the profile.

Returns: JsonNode. Decoded JSON answer of the operation "Create a quota profile".

Raises: the typed errors of the transport (Errors).

MembersClient.createQuotaProfile​

JsonNode createQuotaProfile(Object body, RequestOptions options)

Create a quota profile. Creates a reusable quota profile for group mappings. Needs tenant_admin. At least one of limit_cost and limit_tokens is required (422 validation_error). A name already used answers 409 conflict. Writes the audit event identity.quota_profile.create.

Route: /v1/identity/quota-profiles (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesName, period, enforcement and limits of the profile.
optionsRequestOptionsyesPer call options (idempotency key, traceparent, headers, abort signal).

Returns: JsonNode. Decoded JSON answer of the operation "Create a quota profile".

Raises: the typed errors of the transport (Errors).

MembersClient.delete​

void delete(String id)

Remove a member. Removes the membership: the user loses the role it gave at the next request. Needs tenant_admin. Writes the audit event member.remove. Answers 204, or 404 not_found.

Route: /v1/members/{member_id} (DELETE).

NameTypeDefaultRequiredDescription
idStringyesIdentifier (UUID) of the membership.

Returns: void.

Raises: the typed errors of the transport (Errors).

MembersClient.deleteGroupMapping​

void deleteGroupMapping(String id)

Delete a group mapping. Deletes the mapping and withdraws what it granted (project memberships and quotas recorded as granted by this mapping); memberships granted by hand stay. Needs tenant_admin. Writes the audit event identity.group_mapping.delete. Answers 204, or 404 not_found for an unknown mapping.

Route: /v1/identity/group-mappings/{mapping_id} (DELETE).

NameTypeDefaultRequiredDescription
idStringyesIdentifier (UUID) of the group mapping.

Returns: void.

Raises: the typed errors of the transport (Errors).

MembersClient.deleteQuotaProfile​

void deleteQuotaProfile(String id)

Delete a quota profile. Deletes a quota profile. Needs tenant_admin. A profile still used by a group mapping cannot be deleted (409 conflict): detach it from the mappings first. Writes the audit event identity.quota_profile.delete. Answers 204, or 404 not_found.

Route: /v1/identity/quota-profiles/{profile_id} (DELETE).

NameTypeDefaultRequiredDescription
idStringyesIdentifier (UUID) of the quota profile.

Returns: void.

Raises: the typed errors of the transport (Errors).

MembersClient.getGroupMapping​

JsonNode getGroupMapping(String id)

Get a group mapping. Returns one group mapping. Needs tenant_admin, security_officer or auditor. Answers 404 not_found for an unknown mapping.

Route: /v1/identity/group-mappings/{mapping_id} (GET).

NameTypeDefaultRequiredDescription
idStringyesIdentifier (UUID) of the group mapping.

Returns: JsonNode. Decoded JSON answer of the operation "Get a group mapping".

Raises: the typed errors of the transport (Errors).

MembersClient.list​

Page<JsonNode> list()

List the members. Lists the memberships of the tenant, paginated: user subject, email, display name, role, clearance, project and creation date. Open to any member of the tenant.

Route: /v1/members (GET).

This element takes no parameter.

Returns: Page<JsonNode>. A Page: One page of a cursor paginated collection ({"items": [...], "next_cursor": "..."|null}).

Raises: the typed errors of the transport (Errors).

MembersClient.list​

Page<JsonNode> list(Map<String, ?> query)

List the members. Lists the memberships of the tenant, paginated: user subject, email, display name, role, clearance, project and creation date. Open to any member of the tenant.

Route: /v1/members (GET).

NameTypeDefaultRequiredDescription
queryMap<String, ?>yesQuery string parameters of the route.

Returns: Page<JsonNode>. A Page: One page of a cursor paginated collection ({"items": [...], "next_cursor": "..."|null}).

Raises: the typed errors of the transport (Errors).

MembersClient.listGroupMappings​

JsonNode listGroupMappings()

List the group mappings. Lists every directory group mapping of the tenant with its group, project, role and quota profile. Needs tenant_admin, security_officer or auditor (403 forbidden otherwise). Not paginated: next_cursor is always null.

Route: /v1/identity/group-mappings (GET).

This element takes no parameter.

Returns: JsonNode. Decoded JSON answer of the operation "List the group mappings".

Raises: the typed errors of the transport (Errors).

MembersClient.listQuotaProfiles​

JsonNode listQuotaProfiles()

List the quota profiles. Lists the quota profiles of the tenant (name, period, enforcement, cost and token limits, currency). Needs tenant_admin, security_officer or auditor.

Route: /v1/identity/quota-profiles (GET).

This element takes no parameter.

Returns: JsonNode. Decoded JSON answer of the operation "List the quota profiles".

Raises: the typed errors of the transport (Errors).

MembersClient.update​

JsonNode update(String id, Object body)

Update a member. Changes the role or the clearance of a membership. Needs tenant_admin; granting platform_admin needs a platform administrator (403 forbidden). Writes the audit event member.update. Answers 404 not_found for an unknown membership.

Route: /v1/members/{member_id} (PATCH).

NameTypeDefaultRequiredDescription
idStringyesIdentifier (UUID) of the membership.
bodyObjectyesNew role and/or clearance.

Returns: JsonNode. Decoded JSON answer of the operation "Update a member".

Raises: the typed errors of the transport (Errors).

MembersClient.update​

JsonNode update(String id, Object body, RequestOptions options)

Update a member. Changes the role or the clearance of a membership. Needs tenant_admin; granting platform_admin needs a platform administrator (403 forbidden). Writes the audit event member.update. Answers 404 not_found for an unknown membership.

Route: /v1/members/{member_id} (PATCH).

NameTypeDefaultRequiredDescription
idStringyesIdentifier (UUID) of the membership.
bodyObjectyesNew role and/or clearance.
optionsRequestOptionsyesPer call options (idempotency key, traceparent, headers, abort signal).

Returns: JsonNode. Decoded JSON answer of the operation "Update a member".

Raises: the typed errors of the transport (Errors).

MembersClient.updateGroupMapping​

JsonNode updateGroupMapping(String id, Object body)

Update a group mapping. Changes the group, project, role or quota profile of a mapping; only the fields sent change. clear_quota_profile: true detaches the profile. The new values apply at the next sign in of each member. Needs tenant_admin. A change that would duplicate another mapping answers 409 conflict; an unknown project or profile answers 404. Writes the audit event identity.group_mapping.update.

Route: /v1/identity/group-mappings/{mapping_id} (PATCH).

NameTypeDefaultRequiredDescription
idStringyesIdentifier (UUID) of the group mapping.
bodyObjectyesFields to change; omitted fields keep their value.

Returns: JsonNode. Decoded JSON answer of the operation "Update a group mapping".

Raises: the typed errors of the transport (Errors).

MembersClient.updateQuotaProfile​

JsonNode updateQuotaProfile(String id, Object body)

Update a quota profile. Updates the period, enforcement or limits of a profile, and the user quotas already created from it through group mappings, in the same transaction. Needs tenant_admin. Writes the audit event identity.quota_profile.update with the number of quotas updated. Answers 404 not_found for an unknown profile.

Route: /v1/identity/quota-profiles/{profile_id} (PATCH).

NameTypeDefaultRequiredDescription
idStringyesIdentifier (UUID) of the quota profile.
bodyObjectyesFields to change; omitted fields keep their value.

Returns: JsonNode. Decoded JSON answer of the operation "Update a quota profile".

Raises: the typed errors of the transport (Errors).