Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ Identity and Access Management/ API Reference/ API/ IAM User Management/ Modifying IAM User Information (By the Administrator) (Recommended)

Modifying IAM User Information (By the Administrator) (Recommended)

Updated on 2024-11-18 GMT+08:00

Function

This API is provided for the administrator to modify IAM user information.

The API can be called using both the global endpoint and region-specific endpoints. For IAM endpoints, see Regions and Endpoints.

Debugging

You can debug this API in API Explorer.

URI

PUT /v3.0/OS-USER/users/{user_id}

Table 1 URI parameters

Parameter

Mandatory

Type

Description

user_id

Yes

String

IAM user ID. For details about how to obtain a user ID, see Obtaining Account, IAM User, Group, Project, Region, and Agency Information.

Request Parameters

Table 2 Parameters in the request header

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Fill application/json;charset=utf8 in this field.

X-Auth-Token

Yes

String

Token with Security Administrator permissions.

Table 3 Parameters in the request body

Parameter

Mandatory

Type

Description

user

Yes

Object

IAM user information.

Table 4 user

Parameter

Mandatory

Type

Description

name

No

String

New IAM username, which consists of 1 to 32 characters. It can contain letters (case-sensitive), digits, spaces, hyphens (-), underscores (_), and periods (.), and cannot start with a digit or space.

password

No

String

New password of the user. The password must meet the following requirements:

  • Can contain 8 to 32 characters. The default minimum password length is 8 characters.
  • Must contain at least two of the following character types: uppercase letters, lowercase letters, digits, and special characters.
  • Must meet the requirements of the password policy configured on the account settings page.
  • Must be different from the old password.

email

No

String

New email address with a maximum of 255 characters.

areacode

No

String

Country code. The country code must be used together with a mobile number.

phone

No

String

Mobile number with a maximum of 32 digits. The mobile number must be used together with a country code.

enabled

No

Boolean

Enabling status of the IAM user. true (default value) indicates that the user is enabled. false indicates that the user is disabled.

pwd_status

No

Boolean

Password status. true indicates that the password needs to be changed, and false indicates that the password is normal. If no password is set, this parameter may not be returned.

xuser_type

No

String

Type of the IAM user in the external system. The user type can contain a maximum of 64 characters. xuser_type must be used together with xuser_id and will be verified based on xaccount_type and xdomain_type of the same account.

NOTE:

An external system refers to an enterprise management system connected to Huawei Cloud. Parameters xaccount_type, xaccount_id, xdomain_type, xdomain_id, xuser_type, and xuser_id cannot be obtained from Huawei Cloud. Please contact your enterprise administrator.

xuser_id

No

String

ID of the IAM user in the external system. The user ID can contain a maximum of 128 characters, and must be used together with xuser_type. Due to the latency, the IAM console may not be able to display the external identity ID you have set in real time. Refresh the page later.

NOTE:

An external system refers to an enterprise management system connected to Huawei Cloud. Parameters xaccount_type, xaccount_id, xdomain_type, xdomain_id, xuser_type, and xuser_id cannot be obtained from Huawei Cloud. Please contact your enterprise administrator.

access_mode

No

String

Access type of the IAM user.

  • default: programmatic access and management console access. This option is the default access type.
  • programmatic: programmatic access
  • console: management console access

description

No

String

Description of the IAM user.

Response Parameters

Table 5 Parameters in the response body

Parameter

Type

Description

user

Object

IAM user information.

Table 6 user

Parameter

Type

Description

pwd_status

Boolean

Password status. true indicates that the password needs to be changed, and false indicates that the password is normal. If no password is set, this parameter may not be returned.

create_time

String

Time when the IAM user was created.

NOTE:

The value is a UTC time in the YYYY-MM-DDTHH:mm:ss.ssssss format, for example, 2023-06-28T08:56:33.710000.

xdomain_id

String

ID of the IAM user in the external system.

NOTE:

An external system refers to an enterprise management system connected to Huawei Cloud. Parameters xaccount_type, xaccount_id, xdomain_type, xdomain_id, xuser_type, and xuser_id cannot be obtained from Huawei Cloud. Please contact your enterprise administrator.

xdomain_type

String

Type of the IAM user in the external system.

NOTE:

An external system refers to an enterprise management system connected to Huawei Cloud. Parameters xaccount_type, xaccount_id, xdomain_type, xdomain_id, xuser_type, and xuser_id cannot be obtained from Huawei Cloud. Please contact your enterprise administrator.

is_domain_owner

Boolean

Indicates whether the IAM user is an administrator.

xuser_id

String

ID of the IAM user in the external system.

NOTE:

An external system refers to an enterprise management system connected to Huawei Cloud. Parameters xaccount_type, xaccount_id, xdomain_type, xdomain_id, xuser_type, and xuser_id cannot be obtained from Huawei Cloud. Please contact your enterprise administrator.

xuser_type

String

Type of the IAM user in the external system.

NOTE:

An external system refers to an enterprise management system connected to Huawei Cloud. Parameters xaccount_type, xaccount_id, xdomain_type, xdomain_id, xuser_type, and xuser_id cannot be obtained from Huawei Cloud. Please contact your enterprise administrator.

access_mode

String

Access type of the IAM user.

  • default: programmatic access and management console access. This option is the default access type.
  • programmatic: programmatic access
  • console: management console access

description

String

Description of the IAM user.

name

String

New IAM username, which consists of 1 to 32 characters. It can contain letters (case-sensitive), digits, spaces, hyphens (-), underscores (_), and periods (.), and cannot start with a digit or space.

phone

String

Mobile number with a maximum of 32 digits. The mobile number must be used together with a country code.

domain_id

String

ID of the account used to create the IAM user.

enabled

Boolean

Enabling status of the IAM user. true (default value) indicates that the user is enabled. false indicates that the user is disabled.

areacode

String

Country code.

email

String

New email address.

id

String

IAM user ID.

links

Object

IAM user resource link information.

password_expires_at

String

Password expiration time. This parameter will not be returned if its value is null.

NOTE:

The value is a UTC time in the YYYY-MM-DDTHH:mm:ss.ssssss format, for example, 2023-06-28T08:56:33.710000.

Example Request

Request for an administrator to modify information of an IAM user named IAMUser: change the email address to IAMEmail@huawei.com, mobile number to 085212345678910, and password to IAMPassword@

PUT https://iam.myhuaweicloud.com/v3.0/OS-USER/users/{user_id}
{
    "user": {
        "email": "IAMEmail@huawei.com",
        "areacode": "0852",
        "phone": "12345678910",
        "enabled": true,
        "name": "IAMUser",
        "password": "IAMPassword@",
        "pwd_status": false,
        "xuser_type": "",
        "xuser_id": "",
        "access_mode" : "default",
        "description": "IAMDescription"
    }
}

Example Response

Status code: 200

The request is successful.

{
    "user": {
        "description": "IAMDescription",
        "areacode": "0852",
        "enabled": true,
        "pwd_status": false,
        "xuser_id": "",
        "access_mode" : "default",
        "domain_id": "d78cbac186b744899480f25bd0...",
        "phone": "12345678910",
        "name": "IAMUser",
        "links": {
            "self": "https://iam.myhuaweicloud.com/3.0/OS-USER/users/076934ff9f0010cd1f0bc003..."
        },
        "id": "076934ff9f0010cd1f0bc0031019...",
        "xuser_type": "",
        "email": "IAMEmail@huawei.com",
        "create_time": "2024-03-28T03:42:08.000000",
        "is_domain_owner": false,
        "xdomain_id": "30086000630940966",
        "xdomain_type": ""  
    }
}

Status Codes

Status Code

Description

200

The request is successful.

400

Invalid parameters.

401

Authentication failed.

403

Access denied.

404

The requested resource cannot be found.

405

The method specified in the request is not allowed for the requested resource.

409

A resource conflict occurs.

413

The request entity is too large.

500

Internal server error.

503

Service unavailable.

Error Codes

For details, see Error Codes.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback