Halaman ini belum tersedia dalam bahasa lokal Anda. Kami berusaha keras untuk menambahkan lebih banyak versi bahasa. Terima kasih atas dukungan Anda.

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/ Auto Scaling/ API Reference (Ankara Region)/ APIs/ AS Policies/ Querying AS Policies Bound to an AS Group

Querying AS Policies Bound to an AS Group

Updated on 2024-04-25 GMT+08:00

Function

This API is used to query AS policies based on search criteria. The results are displayed by page.

  • Search criteria can be the AS policy name, policy type, policy ID, start line number, and number of records.
  • If no search criteria are specified, a maximum of 20 AS policies for a specified AS group can be queried for a tenant by default.

URI

GET /autoscaling-api/v1/{project_id}/scaling_policy/{scaling_group_id}/list

NOTE:

You can type the question mark (?) and ampersand (&) at the end of the URI to define multiple search criteria. AS policies can be searched by all optional parameters in the following table. For details, see the example request.

Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID.

scaling_group_id

Yes

String

Specifies the AS group ID.

scaling_policy_name

No

String

Specifies the AS policy name.

Supports fuzzy search.

scaling_policy_type

No

String

Specifies the AS policy type.

  • ALARM: alarm policy
  • SCHEDULED: scheduled policy
  • RECURRENCE: periodic policy

scaling_policy_id

No

String

Specifies the AS policy ID.

start_number

No

Integer

Specifies the start line number. The default value is 0. The minimum parameter value is 0.

limit

No

Integer

Specifies the number of query records. The default value is 20. The value ranges from 0 to 100.

Request

None

Example Request

This example queries scheduled AS policies named as-policy-test of the AS group with ID e5d27f5c-dd76-4a61-b4bc-a67c5686719a.
GET https://{Endpoint}/autoscaling-api/v1/{project_id}/scaling_policy/e5d27f5c-dd76-4a61-b4bc-a67c5686719a/list?scaling_policy_name=as-policy-test&scaling_policy_type=SCHEDULED

Response

Table 2 Response parameters

Parameter

Type

Description

total_number

Integer

Specifies the total number of query records.

start_number

Integer

Specifies the start line number.

limit

Integer

Specifies the maximum number of resources to be queried.

scaling_policies

Array of scaling_policies objects

Specifies scaling policies. For details, see Table 3.

Table 3 scaling_policies field description

Parameter

Type

Description

scaling_group_id

String

Specifies the AS group ID.

scaling_policy_name

String

Specifies the AS policy name.

scaling_policy_id

String

Specifies the AS policy ID.

policy_status

String

Specifies the AS policy status.

  • INSERVICE: The AS policy is enabled.
  • PAUSED: The AS policy is disabled.
  • EXECUTING: The AS policy is being executed.

scaling_policy_type

String

Specifies the AS policy type.

  • ALARM: indicates that the scaling action is triggered by an alarm. A value is returned for alarm_id, and no value is returned for scheduled_policy.
  • SCHEDULED: indicates that the scaling action is triggered as scheduled. A value is returned for scheduled_policy, and no value is returned for alarm_id, recurrence_type, recurrence_value, start_time, or end_time.
  • RECURRENCE: indicates that the scaling action is triggered periodically. Values are returned for scheduled_policy, recurrence_type, recurrence_value, start_time, and end_time, and no value is returned for alarm_id.

alarm_id

String

Specifies the alarm ID.

scheduled_policy

scheduled_policy object

Specifies the periodic or scheduled AS policy. For details, see Table 4.

scaling_policy_action

scaling_policy_action object

Specifies the scaling action of the AS policy. For details, see Table 5.

cool_down_time

Integer

Specifies the cooldown period (s).

create_time

String

Specifies the time when an AS policy was created. The time format complies with UTC.

Table 4 scheduled_policy field description

Parameter

Type

Description

launch_time

String

Specifies the time when the scaling action is triggered. The time format complies with UTC.

  • If scaling_policy_type is set to SCHEDULED, the time format is YYYY-MM-DDThh:mmZ.
  • If scaling_policy_type is set to RECURRENCE, the time format is hh:mm.

recurrence_type

String

Specifies the type of a periodically triggered scaling action.

  • Daily: indicates that the scaling action is triggered once a day.
  • Weekly: indicates that the scaling action is triggered once a week.
  • Monthly: indicates that the scaling action is triggered once a month.

recurrence_value

String

Specifies the frequency at which scaling actions are triggered.

  • If recurrence_type is set to Daily, the value is null, indicating that the scaling action is triggered once a day.
  • If recurrence_type is set to Weekly, the value ranges from 1 (Sunday) to 7 (Saturday). The digits refer to dates in each week and separated by a comma, such as 1,3,5.
  • If recurrence_type is set to Monthly, the value ranges from 1 to 31. The digits refer to the dates in each month and separated by a comma, such as 1,10,13,28.

start_time

String

Specifies the start time of the scaling action triggered periodically. The time format complies with UTC.

The time format is YYYY-MM-DDThh:mmZ.

end_time

String

Specifies the end time of the scaling action triggered periodically. The time format complies with UTC.

The time format is YYYY-MM-DDThh:mmZ.

Table 5 scaling_policy_action field description

Parameter

Type

Description

operation

String

Specifies the scaling action.

  • ADD: adds specified number of instances to the AS group.
  • REMOVE: removes specified number of instances from the AS group.
  • SET: sets the number of instances in the AS group.

instance_number

Integer

Specifies the number of instances to be operated.

instance_percentage

Integer

Specifies the percentage of instances to be operated.

Example Response

{
    "limit": 20,
    "total_number": 1,
    "start_number": 0,
    "scaling_policies": [
        {
            "scaling_policy_id": "fd7d63ce-8f5c-443e-b9a0-bef9386b23b3",
            "scaling_group_id": "e5d27f5c-dd76-4a61-b4bc-a67c5686719a",
            "scaling_policy_name": "as-policy-test",
            "scaling_policy_type": "SCHEDULED",
            "scheduled_policy": {
                "launch_time": "2015-07-24T01:21Z"
            },
            "cool_down_time": 300,
            "scaling_policy_action": {
                "operation": "REMOVE",
                "instance_number": 1
            },
            "policy_status": "INSERVICE",
            "create_time": "2015-07-24T01:09:30Z"
        }
    ]
}

Returned Value

  • Normal

    200

  • Abnormal

    Returned Value

    Description

    400 Bad Request

    The server failed to process the request.

    401 Unauthorized

    You must enter the username and 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 to process the request.

    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 an internal 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 request is invalid.

    503 Service Unavailable

    Failed to complete the request because the system is unavailable.

    504 Gateway Timeout

    A gateway timeout error occurred.

Error Codes

See Error Codes.

Kami menggunakan cookie untuk meningkatkan kualitas situs kami dan pengalaman Anda. Dengan melanjutkan penelusuran di situs kami berarti Anda menerima kebijakan cookie kami. Cari tahu selengkapnya

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback