Creates a local team
POSThttps://apis.<domain>/iam/teams
Creates a local team that is used to group local users as members of IAM policies.
Authorization Action:
iam:teams:create
Request
- application/json
Bodyrequired
idstringrequired
namestringrequired
tenantsstring[]
Responses
- 200
- default
A successful response.
- application/json
- Schema
- Example (auto)
Schema
team object
{
"team": {
"id": "test-id",
"name": "My Test Team",
"tenants": [
"tenant1",
"tenant2"
]
}
}
An unexpected error response.
- application/json
- Schema
- Example (auto)
Schema
codeinteger<int32>
messagestring
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://apis.<domain>/iam/teams");
request.Headers.Add("Accept", "application/json");
var content = new StringContent("{\n \"id\": \"my-team-id\",\n \"name\": \"My Test Team\",\n \"tenants\": [\n \"tenant1\",\n \"tenant2\"\n ]\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());