Update User Group Members
client.iam.userGroups.members.update(stringuserGroupId, MemberUpdateParams { account_id, members } params, RequestOptionsoptions?): SinglePage<MemberUpdateResponse { id, email, status } >
PUT/accounts/{account_id}/iam/user_groups/{user_group_id}/members
Replace the set of members attached to a User Group.
Security
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
Update User Group Members
import Cloudflare from 'cloudflare';
const client = new Cloudflare({
apiEmail: process.env['CLOUDFLARE_EMAIL'], // This is the default and can be omitted
apiKey: process.env['CLOUDFLARE_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const memberUpdateResponse of client.iam.userGroups.members.update(
'023e105f4ecef8ad9ca31a8372d0c353',
{
account_id: '023e105f4ecef8ad9ca31a8372d0c353',
members: [{ id: '023e105f4ecef8ad9ca31a8372d0c353' }],
},
)) {
console.log(memberUpdateResponse.id);
}{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"success": true,
"result": [
{
"id": "4f5f0c14a2a41d5063dd301b2f829f04",
"email": "user@example.com",
"status": "accepted"
}
]
}Returns Examples
{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"success": true,
"result": [
{
"id": "4f5f0c14a2a41d5063dd301b2f829f04",
"email": "user@example.com",
"status": "accepted"
}
]
}