Esta página ainda não está disponível no idioma selecionado. Estamos trabalhando para adicionar mais opções de idiomas. Agradecemos sua compreensão.

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

Querying Protection Groups

Updated on 2023-11-21 GMT+08:00

Function

This API is used to query all protection groups of the current tenant.

Constraints and Limitations

None

URI

  • URI format

    GET /v1/{project_id}/server-groups

  • Parameter description

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Specifies the project ID.

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

  • Request filter field description

    Parameter

    Mandatory

    Type

    Description

    limit

    No

    Integer

    Specifies the maximum number of results returned each time. The value is a positive integer from 0 to 1000. The default value is 1000.

    offset

    No

    Integer

    Specifies the offset of each request. The default value is 0. The value must be a number and cannot be negative.

    status

    No

    String

    Specifies the protection group status.

    For details, see Protection Group Status.

    name

    No

    String

    Specifies the name of a protection group.

    Fuzzy search is supported.

    query_type

    No

    String

    Specifies the query type.

    • status_abnormal: indicates to query protection groups in the abnormal status.
    • stop_protected: indicates to query protection groups for which the protection is disabled.
    • period_no_dr_drill: indicates to query the protection groups for which the no DR drills have been performed in a specified duration. The default duration is 3 months.
    • This parameter is invalid when the value is set to general or left empty.

    availability_zone

    No

    String

    Specifies the current production site AZ of a protection group.

    You can obtain this value by calling the API described in Querying an Active-Active Domain.

Request

  • Request parameters

    None

  • Example request

    GET https://{Endpoint}/v1/{project_id}/server-groups

Response

  • Parameter description

    Parameter

    Type

    Description

    server_groups

    Array of objects

    Specifies the information about protection groups.

    For details, see Table 1.

    count

    Integer

    Specifies the number of protection groups that meet the filtering criteria.

    Table 1 server_groups field description

    Parameter

    Type

    Description

    id

    String

    Specifies the ID of a protection group.

    name

    String

    Specifies the name of a protection group.

    description

    String

    Specifies the description of a protection group.

    status

    String

    Specifies the status of a protection group. For details, see Protection Group Status.

    progress

    Integer

    Specifies the synchronization progress of a protection group.

    Unit: %

    source_availability_zone

    String

    Specifies the production site AZ configured when a protection group is created.

    The value does not change after a planned failover or failover.

    target_availability_zone

    String

    Specifies the DR site AZ configured when a protection group is created.

    The value does not change after a planned failover or failover.

    domain_id

    String

    Specifies the ID of an active-active domain.

    domain_name

    String

    Specifies the name of an active-active domain.

    priority_station

    String

    Specifies the current production site of a protection group.

    • source: indicates that the current production site AZ is the source_availability_zone value.
    • target: indicates that the current production site AZ is the target_availability_zone value.

    protected_instance_num

    Integer

    Specifies the number of protected instances in a protection group.

    replication_num

    Integer

    Specifies the number of replication pairs in a protection group.

    disaster_recovery_drill_num

    Integer

    Specifies the number of DR drills in a protection group.

    protected_status

    String

    Specifies whether protection is enabled or not.

    • started: Protection is enabled.
    • stopped: Protection is disabled.
    NOTE:

    The system has been upgraded. For newly protection groups, the value of this parameter is null.

    replication_status

    String

    Specifies the data synchronization status.

    • active: Data has been synchronized.
    • inactive: Data is not synchronized.
    • copying: Data is being synchronized.
    • active-stopped: Data synchronization is stopped.
    NOTE:

    The system has been upgraded. For newly protection groups, the value of this parameter is null.

    health_status

    String

    Specifies the health status of a protection group.

    • normal: The protection group is normal.
    • abnormal: The protection group is abnormal.
    NOTE:

    The system is upgraded recently. For protection groups created after the upgrade, the value of this parameter is null.

    source_vpc_id

    String

    Specifies the ID of the VPC for the production site.

    target_vpc_id

    String

    Specifies the ID of the VPC for the DR site.

    test_vpc_id

    String

    Specifies the ID of the VPC used for a DR drill. This parameter is not used in the current version.

    dr_type

    String

    Specifies the deployment model. The default value is migration, indicating migration within a VPC.

    created_at

    String

    Specifies the time when a protection group was created.

    The default format is as follows: "yyyy-MM-dd HH:mm:ss.SSS", for example, 2019-04-01 12:00:00.000.

    updated_at

    String

    Specifies the time when a protection group was updated.

    The default format is as follows: "yyyy-MM-dd HH:mm:ss.SSS", for example, 2019-04-01 12:00:00.000.

    protection_type

    String

    Specifies the protection mode.

    • replication-pair: indicates that data synchronization is performed at the replication pair level.
    • null: indicates that data synchronization is performed at the replication consistency group level.
    NOTE:

    The system has been upgraded. Data synchronization is performed at the replication pair level for all resources, and the returned value is replication-pair.

    replication_model

    String

    Specifies the protection mode.

    NOTE:

    This parameter is reserved.

    server_type

    String

    Specifies the type of managed servers.

    • ECS: indicates that ECSs are managed.
  • Example response
    { 
       "count": 2, 
       "server_groups": [ 
            {
                "id": "40df180b-9fe2-471a-8c64-1b758dc84189",
                "name": "testname",
                "description": "description",
                "source_availability_zone": "cn-north-1a",
                "target_availability_zone": "cn-north-1b",
                "domain_id": "fb4bb8e3-a574-4437-a156-78c916aeea4d",
                "domain_name": "ActiveactiveDomain",
                "status": "available",
                "protected_status": null,
                "replication_status": null,
                "health_status": null,
                "progress": 0,
                "priority_station": "source",
                "protected_instance_num": 0,
                "replication_num": 0,
                "disaster_recovery_drill_num": 0,
                "source_vpc_id": "046852ef-c49d-409b-8389-546aaaa5701f",
                "target_vpc_id": "046852ef-c49d-409b-8389-546aaaa5701f",
                "test_vpc_id": null,
                "dr_type": "migration",
                "server_type":"ECS"
                "created_at": "2019-05-23 03:51:58.256",
                "updated_at": "2019-05-23 07:48:12.484",
                "protection_type": "replication-pair",
                "replication_model": null
            },
            {
                "id": "decf224d-87fe-403a-8721-037a1a45c287",
                "name": "Protection-Group-lwx",
                "description": null,
                "source_availability_zone": "cn-north-1a",
                "target_availability_zone": "cn-north-1b",
                "domain_id": "fb4bb8e3-a574-4437-a156-78c916aeea4d",
                "domain_name": "ActiveactiveDomain",
                "status": "available",
                "protected_status": null,
                "replication_status": null,
                "health_status": null,
                "progress": 0,
                "priority_station": "source",
                "protected_instance_num": 0,
                "replication_num": 0,
                "disaster_recovery_drill_num": 0,
                "source_vpc_id": "046852ef-c49d-409b-8389-546aaaa5701f",
                "target_vpc_id": "046852ef-c49d-409b-8389-546aaaa5701f",
                "test_vpc_id": null,
                "dr_type": "migration",
                "server_type":ECS,
                "created_at": "2019-05-22 08:16:54.413",
                "updated_at": "2019-05-23 07:48:12.493",
                "protection_type": "replication-pair",
                "replication_model": null
            }
       ] 
     }

    Or

    { 
         "error": { 
             "message": "XXXX",  
             "code": "XXX" 
         } 
     }

    In this example, error represents a general error, including badrequest (shown below) and itemNotFound.

    { 
         "badrequest": { 
             "message": "XXXX",  
             "code": "XXX" 
         } 
     }

Returned Values

  • Normal

    Returned Value

    Description

    200

    The server has accepted the request.

  • Abnormal

    Returned Value

    Description

    400 Bad Request

    The server failed to process the request.

    401 Unauthorized

    You must enter a username and the password to access the requested page.

    403 Forbidden

    You are forbidden to access the requested page.

    404 Not Found

    The server could not find the requested page.

    405 Method Not Allowed

    You are not allowed to use the method specified in the request.

    406 Not Acceptable

    The response generated by the server could not be accepted by the client.

    407 Proxy Authentication Required

    You must use the proxy server for authentication so that the request can be processed.

    408 Request Timeout

    The request timed out.

    409 Conflict

    The request could not be processed due to a conflict.

    500 Internal Server Error

    Failed to complete the request because of a service error.

    501 Not Implemented

    Failed to complete the request because the server does not support the requested function.

    502 Bad Gateway

    Failed to complete the request because the server receives an invalid response from an upstream server.

    503 Service Unavailable

    Failed to complete the request because the system is unavailable.

    504 Gateway Timeout

    A gateway timeout error occurred.

Usamos cookies para aprimorar nosso site e sua experiência. Ao continuar a navegar em nosso site, você aceita nossa política de cookies. Saiba mais

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback