diff --git a/docs/data-sources/cloud_user_org_assignment.md b/docs/data-sources/cloud_user_org_assignment.md index c994c7f435..d8946e095c 100644 --- a/docs/data-sources/cloud_user_org_assignment.md +++ b/docs/data-sources/cloud_user_org_assignment.md @@ -18,13 +18,15 @@ resource "mongodbatlas_cloud_user_org_assignment" "example" { } data "mongodbatlas_cloud_user_org_assignment" "example_username" { - org_id = var.org_id - username = var.user_email + org_id = var.org_id + username = var.user_email + depends_on = [mongodbatlas_cloud_user_org_assignment.example] } data "mongodbatlas_cloud_user_org_assignment" "example_user_id" { - org_id = var.org_id - user_id = var.user_id + org_id = var.org_id + user_id = var.user_id + depends_on = [mongodbatlas_cloud_user_org_assignment.example] } ``` @@ -33,7 +35,7 @@ data "mongodbatlas_cloud_user_org_assignment" "example_user_id" { ### Required -- `org_id` (String) Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the [/orgs](#tag/Organizations/operation/listOrganizations) endpoint to retrieve all organizations to which the authenticated user has access. +- `org_id` (String) Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the [/orgs](https://www.mongodb.com/docs/api/doc/atlas-admin-api-v2/group/endpoint-organizations) endpoint to retrieve all organizations to which the authenticated user has access. ### Optional diff --git a/docs/data-sources/cloud_user_team_assignment.md b/docs/data-sources/cloud_user_team_assignment.md new file mode 100644 index 0000000000..98a79b9048 --- /dev/null +++ b/docs/data-sources/cloud_user_team_assignment.md @@ -0,0 +1,77 @@ +# Data Source: mongodbatlas_cloud_user_team_assignment + +`mongodbatlas_cloud_user_team_assignment` provides a Cloud User Team Assignment data source. The data source lets you retrieve a user assigned to a team. + +-> **NOTE**Users with pending invitations created using the deprecated `mongodbatlas_project_invitation` resource or via the deprecated [Invite One MongoDB Cloud User to One Project](https://www.mongodb.com/docs/api/doc/atlas-admin-api-v2/operation/operation-getorganizationuser#tag/Projects/operation/createProjectInvitation) +endpoint are not returned with this resource. See [MongoDB Atlas API](https://www.mongodb.com/docs/api/doc/atlas-admin-api-v2/operation/operation-listteamusers) for details. +To manage such users with this resource, refer to our [migration guide]. + +## Example Usages + +```terraform +resource "mongodbatlas_cloud_user_team_assignment" "example" { + org_id = var.org_id + team_id = var.team_id + user_id = var.user_id +} + +data "mongodbatlas_cloud_user_team_assignment" "example_user_id" { + org_id = var.org_id + team_id = var.team_id + user_id = var.user_id + depends_on = [mongodbatlas_cloud_user_team_assignment.example] +} + +data "mongodbatlas_cloud_user_team_assignment" "example_username" { + org_id = var.org_id + team_id = var.team_id + username = var.user_email + depends_on = [mongodbatlas_cloud_user_team_assignment.example] +} +``` + + +## Schema + +### Required + +- `org_id` (String) Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the [/orgs](https://www.mongodb.com/docs/api/doc/atlas-admin-api-v2/group/endpoint-organizations) endpoint to retrieve all organizations to which the authenticated user has access. +- `team_id` (String) Unique 24-hexadecimal digit string that identifies the team to which you want to assign the MongoDB Cloud user. Use the [/teams](https://www.mongodb.com/docs/api/doc/atlas-admin-api-v2/group/endpoint-teams) endpoint to retrieve all teams to which the authenticated user has access. + +### Optional + +- `user_id` (String) Unique 24-hexadecimal digit string that identifies the MongoDB Cloud user. +- `username` (String) Email address that represents the username of the MongoDB Cloud user. + +### Read-Only + +- `country` (String) Two-character alphabetical string that identifies the MongoDB Cloud user's geographic location. This parameter uses the ISO 3166-1a2 code format. +- `created_at` (String) Date and time when MongoDB Cloud created the current account. This value is in the ISO 8601 timestamp format in UTC. +- `first_name` (String) First or given name that belongs to the MongoDB Cloud user. +- `invitation_created_at` (String) Date and time when MongoDB Cloud sent the invitation. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC. +- `invitation_expires_at` (String) Date and time when the invitation from MongoDB Cloud expires. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC. +- `inviter_username` (String) Username of the MongoDB Cloud user who sent the invitation to join the organization. +- `last_auth` (String) Date and time when the current account last authenticated. This value is in the ISO 8601 timestamp format in UTC. +- `last_name` (String) Last name, family name, or surname that belongs to the MongoDB Cloud user. +- `mobile_number` (String) Mobile phone number that belongs to the MongoDB Cloud user. +- `org_membership_status` (String) String enum that indicates whether the MongoDB Cloud user has a pending invitation to join the organization or they are already active in the organization. +- `roles` (Attributes) Organization and project level roles to assign the MongoDB Cloud user within one organization. (see [below for nested schema](#nestedatt--roles)) +- `team_ids` (Set of String) List of unique 24-hexadecimal digit strings that identifies the teams to which this MongoDB Cloud user belongs. + + +### Nested Schema for `roles` + +Read-Only: + +- `org_roles` (Set of String) One or more organization level roles to assign the MongoDB Cloud user. +- `project_role_assignments` (Attributes Set) List of project level role assignments to assign the MongoDB Cloud user. (see [below for nested schema](#nestedatt--roles--project_role_assignments)) + + +### Nested Schema for `roles.project_role_assignments` + +Read-Only: + +- `project_id` (String) Unique 24-hexadecimal digit string that identifies the project to which these roles belong. +- `project_roles` (Set of String) One or more project-level roles assigned to the MongoDB Cloud user. + +For more information see: [MongoDB Atlas API - Cloud Users](https://www.mongodb.com/docs/api/doc/atlas-admin-api-v2/operation/operation-listteamusers) Documentation. diff --git a/docs/resources/cloud_user_org_assignment.md b/docs/resources/cloud_user_org_assignment.md index 140cd83267..0cd1729e6a 100644 --- a/docs/resources/cloud_user_org_assignment.md +++ b/docs/resources/cloud_user_org_assignment.md @@ -18,13 +18,15 @@ resource "mongodbatlas_cloud_user_org_assignment" "example" { } data "mongodbatlas_cloud_user_org_assignment" "example_username" { - org_id = var.org_id - username = var.user_email + org_id = var.org_id + username = var.user_email + depends_on = [mongodbatlas_cloud_user_org_assignment.example] } data "mongodbatlas_cloud_user_org_assignment" "example_user_id" { - org_id = var.org_id - user_id = var.user_id + org_id = var.org_id + user_id = var.user_id + depends_on = [mongodbatlas_cloud_user_org_assignment.example] } ``` @@ -33,7 +35,7 @@ data "mongodbatlas_cloud_user_org_assignment" "example_user_id" { ### Required -- `org_id` (String) Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the [/orgs](#tag/Organizations/operation/listOrganizations) endpoint to retrieve all organizations to which the authenticated user has access. +- `org_id` (String) Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the [/orgs](https://www.mongodb.com/docs/api/doc/atlas-admin-api-v2/group/endpoint-organizations) endpoint to retrieve all organizations to which the authenticated user has access. - `roles` (Attributes) Organization and project level roles to assign the MongoDB Cloud user within one organization. (see [below for nested schema](#nestedatt--roles)) - `username` (String) Email address that represents the username of the MongoDB Cloud user. diff --git a/docs/resources/cloud_user_team_assignment.md b/docs/resources/cloud_user_team_assignment.md new file mode 100644 index 0000000000..f31288e9cb --- /dev/null +++ b/docs/resources/cloud_user_team_assignment.md @@ -0,0 +1,84 @@ +# Resource: mongodbatlas_cloud_user_team_assignment + +`mongodbatlas_cloud_user_team_assignment` provides a Cloud User Team Assignment resource. It lets you manage the association between a cloud user and a team, enabling you to import, assign, remove, or update the user's membership. + +-> **NOTE**Users with pending invitations created using the deprecated `mongodbatlas_project_invitation` resource or via the deprecated [Invite One MongoDB Cloud User to One Project](https://www.mongodb.com/docs/api/doc/atlas-admin-api-v2/operation/operation-getorganizationuser#tag/Projects/operation/createProjectInvitation) +endpoint cannot be managed with this resource. See [MongoDB Atlas API](https://www.mongodb.com/docs/api/doc/atlas-admin-api-v2/operation/operation-listteamusers) for details. +To manage such users with this resource, refer to our [migration guide]. + +## Example Usages + +```terraform +resource "mongodbatlas_cloud_user_team_assignment" "example" { + org_id = var.org_id + team_id = var.team_id + user_id = var.user_id +} + +data "mongodbatlas_cloud_user_team_assignment" "example_user_id" { + org_id = var.org_id + team_id = var.team_id + user_id = var.user_id + depends_on = [mongodbatlas_cloud_user_team_assignment.example] +} + +data "mongodbatlas_cloud_user_team_assignment" "example_username" { + org_id = var.org_id + team_id = var.team_id + username = var.user_email + depends_on = [mongodbatlas_cloud_user_team_assignment.example] +} +``` + + +## Schema + +### Required + +- `org_id` (String) Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the [/orgs](https://www.mongodb.com/docs/api/doc/atlas-admin-api-v2/group/endpoint-organizations) endpoint to retrieve all organizations to which the authenticated user has access. +- `team_id` (String) Unique 24-hexadecimal digit string that identifies the team to which you want to assign the MongoDB Cloud user. Use the [/teams](https://www.mongodb.com/docs/api/doc/atlas-admin-api-v2/group/endpoint-teams) endpoint to retrieve all teams to which the authenticated user has access. +- `user_id` (String) Unique 24-hexadecimal digit string that identifies the MongoDB Cloud user. + +### Read-Only + +- `country` (String) Two-character alphabetical string that identifies the MongoDB Cloud user's geographic location. This parameter uses the ISO 3166-1a2 code format. +- `created_at` (String) Date and time when MongoDB Cloud created the current account. This value is in the ISO 8601 timestamp format in UTC. +- `first_name` (String) First or given name that belongs to the MongoDB Cloud user. +- `invitation_created_at` (String) Date and time when MongoDB Cloud sent the invitation. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC. +- `invitation_expires_at` (String) Date and time when the invitation from MongoDB Cloud expires. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC. +- `inviter_username` (String) Username of the MongoDB Cloud user who sent the invitation to join the organization. +- `last_auth` (String) Date and time when the current account last authenticated. This value is in the ISO 8601 timestamp format in UTC. +- `last_name` (String) Last name, family name, or surname that belongs to the MongoDB Cloud user. +- `mobile_number` (String) Mobile phone number that belongs to the MongoDB Cloud user. +- `org_membership_status` (String) String enum that indicates whether the MongoDB Cloud user has a pending invitation to join the organization or they are already active in the organization. +- `roles` (Attributes) Organization and project level roles to assign the MongoDB Cloud user within one organization. (see [below for nested schema](#nestedatt--roles)) +- `team_ids` (Set of String) List of unique 24-hexadecimal digit strings that identifies the teams to which this MongoDB Cloud user belongs. +- `username` (String) Email address that represents the username of the MongoDB Cloud user. + + +### Nested Schema for `roles` + +Read-Only: + +- `org_roles` (Set of String) One or more organization level roles to assign the MongoDB Cloud user. +- `project_role_assignments` (Attributes Set) List of project level role assignments to assign the MongoDB Cloud user. (see [below for nested schema](#nestedatt--roles--project_role_assignments)) + + +### Nested Schema for `roles.project_role_assignments` + +Read-Only: + +- `project_id` (String) Unique 24-hexadecimal digit string that identifies the project to which these roles belong. +- `project_roles` (Set of String) One or more project-level roles assigned to the MongoDB Cloud user. + +## Import + +Cloud User Team Assignment resource can be imported using the Org ID & Team ID & User ID OR Org ID & Team ID & Username, in the format `ORG_ID/TEAM_ID/USER_ID` OR `ORG_ID/TEAM_ID/USERNAME`. + +``` +$ terraform import mongodbatlas_cloud_user_team_assignment.test 63cfbf302333a3011d98592e/9f3c1e7a4d8b2f6051acde47/5f18367ccb7a503a2b481b7a +OR +$ terraform import mongodbatlas_cloud_user_team_assignment.test 63cfbf302333a3011d98592e/9f3c1e7a4d8b2f6051acde47/test-user@example.com +``` + +For more information see: [MongoDB Atlas API - Cloud Users](https://www.mongodb.com/docs/api/doc/atlas-admin-api-v2/operation/operation-addusertoteam) Documentation. diff --git a/examples/mongodbatlas_cloud_user_org_assignment/main.tf b/examples/mongodbatlas_cloud_user_org_assignment/main.tf index b18ce2287b..5687ca5bc8 100644 --- a/examples/mongodbatlas_cloud_user_org_assignment/main.tf +++ b/examples/mongodbatlas_cloud_user_org_assignment/main.tf @@ -7,11 +7,13 @@ resource "mongodbatlas_cloud_user_org_assignment" "example" { } data "mongodbatlas_cloud_user_org_assignment" "example_username" { - org_id = var.org_id - username = var.user_email + org_id = var.org_id + username = var.user_email + depends_on = [mongodbatlas_cloud_user_org_assignment.example] } data "mongodbatlas_cloud_user_org_assignment" "example_user_id" { - org_id = var.org_id - user_id = var.user_id + org_id = var.org_id + user_id = var.user_id + depends_on = [mongodbatlas_cloud_user_org_assignment.example] } diff --git a/examples/mongodbatlas_cloud_user_team_assignment/README.md b/examples/mongodbatlas_cloud_user_team_assignment/README.md new file mode 100644 index 0000000000..0d23e276ad --- /dev/null +++ b/examples/mongodbatlas_cloud_user_team_assignment/README.md @@ -0,0 +1,28 @@ +# Example: mongodbatlas_cloud_user_team_assignment + +This example demonstrates how to use the `mongodbatlas_cloud_user_team_assignment` resource to assign a user to a team within a MongoDB Atlas organization. + +## Usage + +```hcl +provider "mongodbatlas" { + public_key = var.public_key + private_key = var.private_key +} + +resource "mongodbatlas_cloud_user_team_assignment" "example" { + org_id = var.org_id + team_id = var.team_id + user_id = var.user_id +} +``` + +You must set the following variables: +- `public_key`: Your MongoDB Atlas API public key. +- `private_key`: Your MongoDB Atlas API private key. +- `org_id`: The ID of the MongoDB Atlas organization. +- `team_id`: The ID of the team to assign the user to. +- `user_id`: The ID of the user to assign to the team. + + +To learn more, see the [MongoDB Atlas API - Cloud Users](https://www.mongodb.com/docs/api/doc/atlas-admin-api-v2/operation/operation-addusertoteam) Documentation. diff --git a/examples/mongodbatlas_cloud_user_team_assignment/main.tf b/examples/mongodbatlas_cloud_user_team_assignment/main.tf new file mode 100644 index 0000000000..77b3c0a376 --- /dev/null +++ b/examples/mongodbatlas_cloud_user_team_assignment/main.tf @@ -0,0 +1,19 @@ +resource "mongodbatlas_cloud_user_team_assignment" "example" { + org_id = var.org_id + team_id = var.team_id + user_id = var.user_id +} + +data "mongodbatlas_cloud_user_team_assignment" "example_user_id" { + org_id = var.org_id + team_id = var.team_id + user_id = var.user_id + depends_on = [mongodbatlas_cloud_user_team_assignment.example] +} + +data "mongodbatlas_cloud_user_team_assignment" "example_username" { + org_id = var.org_id + team_id = var.team_id + username = var.user_email + depends_on = [mongodbatlas_cloud_user_team_assignment.example] +} diff --git a/examples/mongodbatlas_cloud_user_team_assignment/outputs.tf b/examples/mongodbatlas_cloud_user_team_assignment/outputs.tf new file mode 100644 index 0000000000..27c97a3703 --- /dev/null +++ b/examples/mongodbatlas_cloud_user_team_assignment/outputs.tf @@ -0,0 +1,14 @@ +output "user_from_username" { + description = "User details retrieved by username" + value = data.mongodbatlas_cloud_user_team_assignment.example_username +} + +output "user_from_user_id" { + description = "User details retrieved by user_id" + value = data.mongodbatlas_cloud_user_team_assignment.example_user_id +} + +output "assigned_user" { + description = "Details of the user assigned to the team" + value = mongodbatlas_cloud_user_team_assignment.example +} diff --git a/examples/mongodbatlas_cloud_user_team_assignment/provider.tf b/examples/mongodbatlas_cloud_user_team_assignment/provider.tf new file mode 100644 index 0000000000..18c430e061 --- /dev/null +++ b/examples/mongodbatlas_cloud_user_team_assignment/provider.tf @@ -0,0 +1,4 @@ +provider "mongodbatlas" { + public_key = var.public_key + private_key = var.private_key +} diff --git a/examples/mongodbatlas_cloud_user_team_assignment/variables.tf b/examples/mongodbatlas_cloud_user_team_assignment/variables.tf new file mode 100644 index 0000000000..b522b12ff6 --- /dev/null +++ b/examples/mongodbatlas_cloud_user_team_assignment/variables.tf @@ -0,0 +1,29 @@ +variable "org_id" { + description = "The MongoDB Atlas organization ID" + type = string +} + +variable "team_id" { + description = "The team ID" + type = string +} + +variable "user_id" { + description = "The user ID" + type = string +} + +variable "user_email" { + description = "The email address of the user" + type = string +} + +variable "public_key" { + description = "Atlas API public key" + type = string +} + +variable "private_key" { + description = "Atlas API private key" + type = string +} diff --git a/examples/mongodbatlas_cloud_user_team_assignment/versions.tf b/examples/mongodbatlas_cloud_user_team_assignment/versions.tf new file mode 100644 index 0000000000..905429b750 --- /dev/null +++ b/examples/mongodbatlas_cloud_user_team_assignment/versions.tf @@ -0,0 +1,9 @@ +terraform { + required_providers { + mongodbatlas = { + source = "mongodb/mongodbatlas" + version = "~> 1.38" + } + } + required_version = ">= 1.0" +} diff --git a/internal/service/clouduserorgassignment/schema.go b/internal/service/clouduserorgassignment/schema.go index 0b51b8c293..17cf146ea7 100755 --- a/internal/service/clouduserorgassignment/schema.go +++ b/internal/service/clouduserorgassignment/schema.go @@ -88,7 +88,7 @@ func resourceSchema() schema.Schema { PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplace(), }, - MarkdownDescription: "Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the [/orgs](#tag/Organizations/operation/listOrganizations) endpoint to retrieve all organizations to which the authenticated user has access.", + MarkdownDescription: "Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the [/orgs](https://www.mongodb.com/docs/api/doc/atlas-admin-api-v2/group/endpoint-organizations) endpoint to retrieve all organizations to which the authenticated user has access.", }, "org_membership_status": schema.StringAttribute{ Computed: true, diff --git a/internal/service/clouduserteamassignment/schema.go b/internal/service/clouduserteamassignment/schema.go index e43b508085..9b2259993f 100644 --- a/internal/service/clouduserteamassignment/schema.go +++ b/internal/service/clouduserteamassignment/schema.go @@ -16,11 +16,11 @@ func resourceSchema() schema.Schema { Attributes: map[string]schema.Attribute{ "org_id": schema.StringAttribute{ Required: true, - MarkdownDescription: "Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the [/orgs](#tag/Organizations/operation/listOrganizations) endpoint to retrieve all organizations to which the authenticated user has access.", + MarkdownDescription: "Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the [/orgs](https://www.mongodb.com/docs/api/doc/atlas-admin-api-v2/group/endpoint-organizations) endpoint to retrieve all organizations to which the authenticated user has access.", }, "team_id": schema.StringAttribute{ Required: true, - MarkdownDescription: "Unique 24-hexadecimal digit string that identifies the team to which you want to assign the MongoDB Cloud user. Use the [/teams](#tag/Teams/operation/listTeams) endpoint to retrieve all teams to which the authenticated user has access.", + MarkdownDescription: "Unique 24-hexadecimal digit string that identifies the team to which you want to assign the MongoDB Cloud user. Use the [/teams](https://www.mongodb.com/docs/api/doc/atlas-admin-api-v2/group/endpoint-teams) endpoint to retrieve all teams to which the authenticated user has access.", }, "user_id": schema.StringAttribute{ Required: true, diff --git a/templates/data-sources/cloud_user_team_assignment.md.tmpl b/templates/data-sources/cloud_user_team_assignment.md.tmpl new file mode 100644 index 0000000000..9b450d767a --- /dev/null +++ b/templates/data-sources/cloud_user_team_assignment.md.tmpl @@ -0,0 +1,15 @@ +# {{.Type}}: {{.Name}} + +`{{.Name}}` provides a Cloud User Team Assignment data source. The data source lets you retrieve a user assigned to a team. + +-> **NOTE**Users with pending invitations created using the deprecated `mongodbatlas_project_invitation` resource or via the deprecated [Invite One MongoDB Cloud User to One Project](https://www.mongodb.com/docs/api/doc/atlas-admin-api-v2/operation/operation-getorganizationuser#tag/Projects/operation/createProjectInvitation) +endpoint are not returned with this resource. See [MongoDB Atlas API](https://www.mongodb.com/docs/api/doc/atlas-admin-api-v2/operation/operation-listteamusers) for details. +To manage such users with this resource, refer to our [migration guide]. + +## Example Usages + +{{ tffile (printf "examples/%s/main.tf" .Name )}} + +{{ .SchemaMarkdown | trimspace }} + +For more information see: [MongoDB Atlas API - Cloud Users](https://www.mongodb.com/docs/api/doc/atlas-admin-api-v2/operation/operation-listteamusers) Documentation. diff --git a/templates/resources/cloud_user_team_assignment.md.tmpl b/templates/resources/cloud_user_team_assignment.md.tmpl new file mode 100644 index 0000000000..c9d4dc59c7 --- /dev/null +++ b/templates/resources/cloud_user_team_assignment.md.tmpl @@ -0,0 +1,25 @@ +# {{.Type}}: {{.Name}} + +`{{.Name}}` provides a Cloud User Team Assignment resource. It lets you manage the association between a cloud user and a team, enabling you to import, assign, remove, or update the user's membership. + +-> **NOTE**Users with pending invitations created using the deprecated `mongodbatlas_project_invitation` resource or via the deprecated [Invite One MongoDB Cloud User to One Project](https://www.mongodb.com/docs/api/doc/atlas-admin-api-v2/operation/operation-getorganizationuser#tag/Projects/operation/createProjectInvitation) +endpoint cannot be managed with this resource. See [MongoDB Atlas API](https://www.mongodb.com/docs/api/doc/atlas-admin-api-v2/operation/operation-listteamusers) for details. +To manage such users with this resource, refer to our [migration guide]. + +## Example Usages + +{{ tffile (printf "examples/%s/main.tf" .Name )}} + +{{ .SchemaMarkdown | trimspace }} + +## Import + +Cloud User Team Assignment resource can be imported using the Org ID & Team ID & User ID OR Org ID & Team ID & Username, in the format `ORG_ID/TEAM_ID/USER_ID` OR `ORG_ID/TEAM_ID/USERNAME`. + +``` +$ terraform import mongodbatlas_cloud_user_team_assignment.test 63cfbf302333a3011d98592e/9f3c1e7a4d8b2f6051acde47/5f18367ccb7a503a2b481b7a +OR +$ terraform import mongodbatlas_cloud_user_team_assignment.test 63cfbf302333a3011d98592e/9f3c1e7a4d8b2f6051acde47/test-user@example.com +``` + +For more information see: [MongoDB Atlas API - Cloud Users](https://www.mongodb.com/docs/api/doc/atlas-admin-api-v2/operation/operation-addusertoteam) Documentation.