team_invitations
Creates, updates, deletes, gets or lists a team_invitations resource.
Overview​
| Name | team_invitations |
| Type | Resource |
| Id | nvidia.orgs.team_invitations |
Fields​
The following fields are returned by SELECT queries:
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Unique invitation ID |
name | string | user name |
created_date | string | Date on which the invitation was created. (ISO-8601 format) (wire: createdDate) |
email | string | Email address of the user. |
is_processed | boolean | Flag indicating if the invitation has already been accepted by the user. (wire: isProcessed) |
org | string | Org to which a user was invited. |
roles | array | List of roles that the user have. |
team | string | Team to which a user was invited. |
type | string | Type of invitation. The invitation is either to an organization or to a team within organization. (ORGANIZATION, TEAM) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | team_name | page_number, page_size, order_by, q | List invitations in a team. (Team User Admin privileges required) |
create_nca | insert | team_name | Invites and creates a User in team | |
delete | delete | team_name, id | Delete a specific invitation in an team. (Org Admin or Team User Admin privileges required) | |
resend_email | exec | team_name, id | Resend email of a specific invitation in a team (Org or Team User Admin privileges required). |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
id | string | |
team_name | string | |
order_by | string | (wire: orderBy) |
page_number | integer (int32) | The page number of result |
page_size | integer (int32) | The page size of result |
q | object | User Search Parameters |
SELECT examples​
- list
List invitations in a team. (Team User Admin privileges required)
SELECT
id,
name,
created_date,
email,
is_processed,
org,
roles,
team,
type
FROM nvidia.orgs.team_invitations
WHERE team_name = '{{ team_name }}' -- required
AND page_number = '{{ page_number }}'
AND page_size = '{{ page_size }}'
AND order_by = '{{ order_by }}'
AND q = '{{ q }}'
;
INSERT examples​
- create_nca
- Manifest
Invites and creates a User in team
INSERT INTO nvidia.orgs.team_invitations (
email,
invitation_expiration_in,
invite_as,
message,
team_name
)
SELECT
'{{ email }}',
{{ invitation_expiration_in }},
'{{ invite_as }}',
'{{ message }}',
'{{ team_name }}'
RETURNING
activation_token,
nca_role,
request_status,
user,
user_roles
;
# Description fields are for documentation purposes
- name: team_invitations
props:
- name: team_name
value: "{{ team_name }}"
description: Required parameter for the team_invitations resource.
- name: email
value: "{{ email }}"
description: |
Is the user email
- name: invitation_expiration_in
value: {{ invitation_expiration_in }}
description: |
Is the numbers of days the invitation will expire
- name: invite_as
value: "{{ invite_as }}"
description: |
Nca allow users to be invited as Admin and as Member
valid_values: ['ADMIN', 'MEMBER']
- name: message
value: "{{ message }}"
description: |
Is a message to the new user
DELETE examples​
- delete
Delete a specific invitation in an team. (Org Admin or Team User Admin privileges required)
DELETE FROM nvidia.orgs.team_invitations
WHERE team_name = '{{ team_name }}' --required
AND id = '{{ id }}' --required
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- resend_email
Resend email of a specific invitation in a team (Org or Team User Admin privileges required).
EXEC nvidia.orgs.team_invitations.resend_email
@team_name='{{ team_name }}' --required,
@id='{{ id }}' --required
;