Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.
ReferenceBeta

Roles

Reference for the roles of your organization: the queries that read them, the mutations that create, update, and delete a role, and the IamRole type.

The roles of the caller's organization, the roles that can be assigned in the caller's workspace, and the mutations that create, replace, and delete a role.

Queries

roles

The roles of the caller's organization, inactive ones included, ordered by id.

roles(
    first: Int
    after: String
    last: Int
    before: String
  ): IamRoleConnection!

Arguments

Name
Type
Description

first

Int

The first n elements from the paginated list.

after

String

The elements that come after the specified cursor.

last

Int

The last n elements from the paginated list. Requires before.

before

String

The elements that come before the specified cursor. Requires last.

Output types:

IamRoleConnection

A page of the roles of the caller's organization.

Implements: Connection

Field
Type
Description

edges

nodes

pageInfo

Information about the current page.

total

The number of roles in the caller's organization, inactive ones included.


role

One role of the caller's organization. Null when IAM has no such role there, or it was deleted.

Arguments

Name
Type
Description

id

ID!

The role ID, as IAM issued it. IamRole isn't a Node, so node(id:) doesn't return a role: read it with role or roles.

Output types:

IamRole

A role of the caller's organization. A role belongs to one organization and reaches no other.

Field
Type
Description

id

ID!

IAM's id for the role, the value role(id:) and every roleId take.

organizationId

ID!

The organization the role belongs to: the same value as ConsoleOrganization.id.

title

String!

The role's name.

description

String

The role's description. Null when it has none.

isActive

Boolean!

Whether the role can be assigned and grants anything. An inactive role is stored but grants nothing.

isSystem

Boolean!

Whether IAM provisioned and protects the role: the organization's Owner. roleUpdate and roleDelete refuse such a role with CONFLICT.

version

Int!

The version number for optimistic locking. Pass it to roleUpdate and roleDelete.

workspaces

The workspaces of the organization the role reaches, by workspace ID. It's empty when Navixy Console has deleted every workspace that the role named. Such a role reaches nothing, and roleUpdate accepts it only with a workspace named again.

productScopes

The products the role grants.

holderCount

How many actors hold the role now, as IAM counts them: every principal type and every holder whose assignment has not expired, including people who have since left the organization or were invited and never joined. IAM holds assignments, not memberships. It can therefore be larger than the number of members a member list shows. 0 for an inactive role, which IAM does not count.


workspaceRoles

The active roles that can be assigned in the caller's workspace, ordered by id. A role created or changed moments ago can be missing for about a second.

Output types:

IamRole

A role of the caller's organization. A role belongs to one organization and reaches no other.

Field
Type
Description

id

ID!

IAM's id for the role, the value role(id:) and every roleId take.

organizationId

ID!

The organization the role belongs to: the same value as ConsoleOrganization.id.

title

String!

The role's name.

description

String

The role's description. Null when it has none.

isActive

Boolean!

Whether the role can be assigned and grants anything. An inactive role is stored but grants nothing.

isSystem

Boolean!

Whether IAM provisioned and protects the role: the organization's Owner. roleUpdate and roleDelete refuse such a role with CONFLICT.

version

Int!

The version number for optimistic locking. Pass it to roleUpdate and roleDelete.

workspaces

The workspaces of the organization the role reaches, by workspace ID. It's empty when Navixy Console has deleted every workspace that the role named. Such a role reaches nothing, and roleUpdate accepts it only with a workspace named again.

productScopes

The products the role grants.

holderCount

How many actors hold the role now, as IAM counts them: every principal type and every holder whose assignment has not expired, including people who have since left the organization or were invited and never joined. IAM holds assignments, not memberships. It can therefore be larger than the number of members a member list shows. 0 for an inactive role, which IAM does not count.


Mutations

roleCreate

Creates a role in the caller's organization.

Arguments

Name
Type
Description

input

IamRoleCreateInput!

The input fields for the new role.

Input types:

IamRoleCreateInput

A new role, homed in the caller's organization. IAM refuses a role granting more than the caller's own roles do with PERMISSION_DENIED, dependencyCode GRANT_CEILING_EXCEEDED.

Field
Type
Description

title

String!

The role's name.

description

String

The role's description. Omitted or null for none.

isActive

Boolean!

Whether the role can be assigned and grants anything.

workspaces

The workspaces of the organization the role reaches, by workspace ID. IAM refuses an empty selection and a workspace that the organization doesn't own. It checks the grant ceiling first and treats an empty selection as every workspace. So a caller whose own roles don't reach every workspace, or don't reach the named one, gets PERMISSION_DENIED with dependencyCode GRANT_CEILING_EXCEEDED. Any other caller gets VALIDATION_ERROR.

productScopes

The products the role grants.

IamSelectionInput

A selection to store: every current and future item when all is true, exactly items otherwise.

Field
Type
Description

all

Boolean!

Whether every current and future item is selected. items must then be empty.

items

[String!]!

The selected items when all is false.

IamRoleProductScopesInput

The products to grant.

Field
Type
Description

all

Boolean!

Whether to grant every product. specific must then be empty.

specific

One scope per product when all is false.

IamRoleProductScopeInput

What to grant within one product.

Field
Type
Description

productCode

IAM's code for the product. At most once per role.

features

The features to grant, by feature code.

dataResources

The data resources to grant.

IamRoleDataResourcesInput

The data resources to grant within one product.

Field
Type
Description

all

Boolean!

Whether to grant every data resource of the product. byType must then be empty.

byType

One grant per data-resource type when all is false.

IamRoleDataResourceGrantInput

What to grant on one data-resource type of a product.

Field
Type
Description

resourceType

IAM's code for the data-resource type. At most once per product.

items

The items of this type to cover.

actions

[String!]!

The actions to grant on every covered item, unless itemActions names the item.

itemActions

Per-item overrides.

IamRoleItemActionsInput

The actions to grant on one data-resource item, in place of its grant's actions.

Field
Type
Description

itemId

String!

IAM's id for the data-resource item. At most once per grant.

actions

[String!]!

The actions to grant on this item.

Output types:

IamRolePayload

The role as IAM stored it.

Field
Type
Description

role

The role as IAM answered the write, not read back.

IamRole (entity)

A role of the caller's organization. A role belongs to one organization and reaches no other.

Field
Type
Description

id

ID!

IAM's id for the role, the value role(id:) and every roleId take.

organizationId

ID!

The organization the role belongs to: the same value as ConsoleOrganization.id.

title

String!

The role's name.

description

String

The role's description. Null when it has none.

isActive

Boolean!

Whether the role can be assigned and grants anything. An inactive role is stored but grants nothing.

isSystem

Boolean!

Whether IAM provisioned and protects the role: the organization's Owner. roleUpdate and roleDelete refuse such a role with CONFLICT.

version

Int!

The version number for optimistic locking. Pass it to roleUpdate and roleDelete.

workspaces

The workspaces of the organization the role reaches, by workspace ID. It's empty when Navixy Console has deleted every workspace that the role named. Such a role reaches nothing, and roleUpdate accepts it only with a workspace named again.

productScopes

The products the role grants.

holderCount

How many actors hold the role now, as IAM counts them: every principal type and every holder whose assignment has not expired, including people who have since left the organization or were invited and never joined. IAM holds assignments, not memberships. It can therefore be larger than the number of members a member list shows. 0 for an inactive role, which IAM does not count.


roleUpdate

Replaces a role's whole document: every field of the input replaces the stored one. See IamRoleUpdateInput.

Arguments

Name
Type
Description

input

IamRoleUpdateInput!

The input fields for the role's new document.

Input types:

IamRoleUpdateInput

The whole new document of a role: every field replaces the stored one, so an omitted description removes it and an empty list empties it. There is no partial update. Refused with CONFLICT when version isn't the stored one, or when the role is a system role. Refused with PERMISSION_DENIED and dependencyCode GRANT_CEILING_EXCEEDED when the role as stored or as written grants more than your own roles do, so you can't change a role that you couldn't have granted, not even to narrow it. The same refusal applies when the role has holders and the change adds access that your own roles don't cover until the last holder's assignment ends.

Field
Type
Description

id

ID!

The role to replace.

version

Int!

The role's version as last read.

title

String!

The role's name.

description

String

The role's description. Omitted or null removes it.

isActive

Boolean!

Whether the role can be assigned and grants anything.

workspaces

The workspaces of the organization the role reaches, by workspace ID. IAM refuses an empty selection and a workspace that the organization doesn't own. It checks the grant ceiling first and treats an empty selection as every workspace. So a caller whose own roles don't reach every workspace, or don't reach the named one, gets PERMISSION_DENIED with dependencyCode GRANT_CEILING_EXCEEDED. Any other caller gets VALIDATION_ERROR.

productScopes

The products the role grants.

IamSelectionInput

A selection to store: every current and future item when all is true, exactly items otherwise.

Field
Type
Description

all

Boolean!

Whether every current and future item is selected. items must then be empty.

items

[String!]!

The selected items when all is false.

IamRoleProductScopesInput

The products to grant.

Field
Type
Description

all

Boolean!

Whether to grant every product. specific must then be empty.

specific

One scope per product when all is false.

IamRoleProductScopeInput

What to grant within one product.

Field
Type
Description

productCode

IAM's code for the product. At most once per role.

features

The features to grant, by feature code.

dataResources

The data resources to grant.

IamRoleDataResourcesInput

The data resources to grant within one product.

Field
Type
Description

all

Boolean!

Whether to grant every data resource of the product. byType must then be empty.

byType

One grant per data-resource type when all is false.

IamRoleDataResourceGrantInput

What to grant on one data-resource type of a product.

Field
Type
Description

resourceType

IAM's code for the data-resource type. At most once per product.

items

The items of this type to cover.

actions

[String!]!

The actions to grant on every covered item, unless itemActions names the item.

itemActions

Per-item overrides.

IamRoleItemActionsInput

The actions to grant on one data-resource item, in place of its grant's actions.

Field
Type
Description

itemId

String!

IAM's id for the data-resource item. At most once per grant.

actions

[String!]!

The actions to grant on this item.

Output types:

IamRolePayload

The role as IAM stored it.

Field
Type
Description

role

The role as IAM answered the write, not read back.

IamRole (entity)

A role of the caller's organization. A role belongs to one organization and reaches no other.

Field
Type
Description

id

ID!

IAM's id for the role, the value role(id:) and every roleId take.

organizationId

ID!

The organization the role belongs to: the same value as ConsoleOrganization.id.

title

String!

The role's name.

description

String

The role's description. Null when it has none.

isActive

Boolean!

Whether the role can be assigned and grants anything. An inactive role is stored but grants nothing.

isSystem

Boolean!

Whether IAM provisioned and protects the role: the organization's Owner. roleUpdate and roleDelete refuse such a role with CONFLICT.

version

Int!

The version number for optimistic locking. Pass it to roleUpdate and roleDelete.

workspaces

The workspaces of the organization the role reaches, by workspace ID. It's empty when Navixy Console has deleted every workspace that the role named. Such a role reaches nothing, and roleUpdate accepts it only with a workspace named again.

productScopes

The products the role grants.

holderCount

How many actors hold the role now, as IAM counts them: every principal type and every holder whose assignment has not expired, including people who have since left the organization or were invited and never joined. IAM holds assignments, not memberships. It can therefore be larger than the number of members a member list shows. 0 for an inactive role, which IAM does not count.


roleDelete

Deletes a role and every assignment of it.

Arguments

Name
Type
Description

input

IamRoleDeleteInput!

The input fields for the role to delete.

Input types:

IamRoleDeleteInput

A role to delete. Refused with CONFLICT when version isn't the stored one, or when the role is a system role. Refused with PERMISSION_DENIED and dependencyCode GRANT_CEILING_EXCEEDED when you couldn't have granted the role. Deleting a role also revokes every assignment of it.

Field
Type
Description

id

ID!

The role to delete.

version

Int!

The role's version as last read.

Output types:

IamRoleDeletePayload

The result of deleting a role.

Field
Type
Description

deletedId

ID!

The id of the deleted role.


Objects

IamRole

A role of the caller's organization. A role belongs to one organization and reaches no other.

Field
Type
Description

id

ID!

IAM's id for the role, the value role(id:) and every roleId take.

organizationId

ID!

The organization the role belongs to: the same value as ConsoleOrganization.id.

title

String!

The role's name.

description

String

The role's description. Null when it has none.

isActive

Boolean!

Whether the role can be assigned and grants anything. An inactive role is stored but grants nothing.

isSystem

Boolean!

Whether IAM provisioned and protects the role: the organization's Owner. roleUpdate and roleDelete refuse such a role with CONFLICT.

version

Int!

The version number for optimistic locking. Pass it to roleUpdate and roleDelete.

workspaces

The workspaces of the organization the role reaches, by workspace ID. It's empty when Navixy Console has deleted every workspace that the role named. Such a role reaches nothing, and roleUpdate accepts it only with a workspace named again.

productScopes

The products the role grants.

holderCount

How many actors hold the role now, as IAM counts them: every principal type and every holder whose assignment has not expired, including people who have since left the organization or were invited and never joined. IAM holds assignments, not memberships. It can therefore be larger than the number of members a member list shows. 0 for an inactive role, which IAM does not count.


IamRolePayload

The role as IAM stored it.

Field
Type
Description

role

The role as IAM answered the write, not read back.


IamRoleDeletePayload

The result of deleting a role.

Field
Type
Description

deletedId

ID!

The id of the deleted role.


Inputs

IamRoleCreateInput

A new role, homed in the caller's organization. IAM refuses a role granting more than the caller's own roles do with PERMISSION_DENIED, dependencyCode GRANT_CEILING_EXCEEDED.

Field
Type
Description

title

String!

The role's name.

description

String

The role's description. Omitted or null for none.

isActive

Boolean!

Whether the role can be assigned and grants anything.

workspaces

The workspaces of the organization the role reaches, by workspace ID. IAM refuses an empty selection and a workspace that the organization doesn't own. It checks the grant ceiling first and treats an empty selection as every workspace. So a caller whose own roles don't reach every workspace, or don't reach the named one, gets PERMISSION_DENIED with dependencyCode GRANT_CEILING_EXCEEDED. Any other caller gets VALIDATION_ERROR.

productScopes

The products the role grants.


IamRoleUpdateInput

The whole new document of a role: every field replaces the stored one, so an omitted description removes it and an empty list empties it. There is no partial update. Refused with CONFLICT when version isn't the stored one, or when the role is a system role. Refused with PERMISSION_DENIED and dependencyCode GRANT_CEILING_EXCEEDED when the role as stored or as written grants more than your own roles do, so you can't change a role that you couldn't have granted, not even to narrow it. The same refusal applies when the role has holders and the change adds access that your own roles don't cover until the last holder's assignment ends.

Field
Type
Description

id

ID!

The role to replace.

version

Int!

The role's version as last read.

title

String!

The role's name.

description

String

The role's description. Omitted or null removes it.

isActive

Boolean!

Whether the role can be assigned and grants anything.

workspaces

The workspaces of the organization the role reaches, by workspace ID. IAM refuses an empty selection and a workspace that the organization doesn't own. It checks the grant ceiling first and treats an empty selection as every workspace. So a caller whose own roles don't reach every workspace, or don't reach the named one, gets PERMISSION_DENIED with dependencyCode GRANT_CEILING_EXCEEDED. Any other caller gets VALIDATION_ERROR.

productScopes

The products the role grants.


IamRoleDeleteInput

A role to delete. Refused with CONFLICT when version isn't the stored one, or when the role is a system role. Refused with PERMISSION_DENIED and dependencyCode GRANT_CEILING_EXCEEDED when you couldn't have granted the role. Deleting a role also revokes every assignment of it.

Field
Type
Description

id

ID!

The role to delete.

version

Int!

The role's version as last read.


Pagination types

IamRoleConnection

A page of the roles of the caller's organization.

Implements: Connection

Field
Type
Description

edges

nodes

pageInfo

Information about the current page.

total

The number of roles in the caller's organization, inactive ones included.


IamRoleEdge

An edge in an IamRoleConnection.

Implements: Edge

Field
Type
Description

cursor

String!

An opaque cursor for this edge.

node


See also

Last updated

Was this helpful?