El contenido no se encuentra disponible en el idioma seleccionado. Estamos trabajando continuamente para agregar más idiomas. Gracias por su apoyo.

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
Situation Awareness
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/ Elastic Cloud Server/ API Reference (Ankara Region)/ APIs (Recommended)/ Batch Operations/ Resetting the Passwords for Logging In to ECSs in a Batch

Resetting the Passwords for Logging In to ECSs in a Batch

Updated on 2024-07-23 GMT+08:00

Function

This API is used to reset the passwords of the ECS management account, root or Administrator, in a batch.

Constraints

  • Before using this API, you must install the password reset plug-in. For instructions about how to download and install the password reset plug-in, see "Installing the One-Click Password Reset Plug-in on an ECS" in the Elastic Cloud Server User Guide.
  • After the request for resetting the password is issued, this API does not report an error if executing the script failed.
  • A new password takes effect after the ECS is started or restarted.
  • This API allows you to reset passwords when the target ECSs are running or stopped.

URI

PUT /v1/{project_id}/cloudservers/os-reset-passwords

Table 1 lists the URI parameters.

Table 1 Parameter description

Parameter

Mandatory

Description

project_id

Yes

Specifies the project ID.

For details about how to obtain the ID, see Obtaining a Project ID.

Request

Table 2 describes the request parameters.

Table 2 Request parameters

Parameter

Type

Mandatory

Description

new_password

String

Yes

Specifies the new password.

This field is mandatory only if dry_run is set to false.

A new password must comply with the following rules:
  • Contain 8 to 26 characters.
  • Contains at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters (!@%-_=+[]:./?).
  • Cannot contain the username or the username spelled backwards.
  • For a Windows ECS, the password cannot contain the username, the username spelled backwards, or more than two consecutive characters in the username.

dry_run

Boolean

No

Specifies whether to check the request and reset ECS passwords.

  • true: indicates that only the password reset request is sent and the passwords for logging in to the ECSs will not be reset. Check items include mandatory parameters, request format, and service restrictions. If the check fails, the system returns an error. If the check result is as expected, the system properly responds.
  • false: indicates that only the password reset request is sent and the passwords for logging in to the ECSs will be reset if the check result is as expected.

The default value is false.

servers

Array of objects

Yes

Specifies the IDs of the target ECSs. For details, see Table 3.

Table 3 servers field description

Parameter

Type

Mandatory

Description

id

String

Yes

Specifies the ECS ID.

Example Request

Reset the passwords of the ECSs whose IDs are 1bd0eb17-4466-4c15-a9ce-87727ad311b5 and fd6b6e9d-64a1-40fa-b7dc-f491be42fdd2, in a batch. For security purposes, store the passwords in ciphertext in configuration files or environment variables.

PUT https://{endpoint}/v1/{project_id}/cloudservers/os-reset-passwords

{
    "new_password": "$ADMIN_PASS",
    "dry_run": true,
    "servers": [
                {
                  "id":"1bd0eb17-4466-4c15-a9ce-87727ad311b5"  
                },
                {
                  "id":"fd6b6e9d-64a1-40fa-b7dc-f491be42fdd2" 
                }
               ]
}

Example Response

See Responses (Batch Operation).

{      
    "response": [                   
                  {                     
                    "id": "616fb98f-46ca-475e-917e-2563e5a8cd19"                      
                   },                   
                  {                     
                    "id": "516fb98f-46ca-475e-917e-2563e5a8cd12"                      
                   }                
                 ] 
}

Error Codes

See Error Codes.

Utilizamos cookies para mejorar nuestro sitio y tu experiencia. Al continuar navegando en nuestro sitio, tú aceptas nuestra política de cookies. Descubre más

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback