CLI Command Reference
Scaling Action Logs
| API Name | Command | Description | Operation |
|---|---|---|---|
| Querying Scaling Action Logs | hcloud AS ListScalingActivityLogs | This API is used to query scaling action logs based on search criteria. The results are displayed by page.
| |
| Querying Scaling Action Logs (V2) | hcloud AS ListScalingActivityV2Logs | This API is used to query scaling action logs based on search criteria. The scaling actions include increasing or decreasing instances, load balancer migration, and setting instances to the standby mode. The results are displayed by page.
|
AS Policy Execution Logs
| API Name | Command | Description | Operation |
|---|---|---|---|
| Querying AS Policy Execution Logs | hcloud AS ListScalingPolicyExecuteLogs | This API is used to query the historical records of AS policy execution based on search criteria. The results are displayed by page.
|
API Version Query
Instances
| API Name | Command | Description | Operation |
|---|---|---|---|
| Querying Instances in an AS Group | hcloud AS ListScalingInstances | This API is used to query instances in an AS group based on search criteria. The results are displayed by page.
| |
| Removing an Instance from an AS Group | hcloud AS DeleteScalingInstance | This API is used to remove a specified instance from an AS group.
| |
| Batch Adding Instances | hcloud AS BatchAddScalingInstances | This API is used to add instances to an AS group in a batch. | |
| Batch Removing Instances | hcloud AS BatchRemoveScalingInstances | This API is used to remove instances from an AS group in a batch. | |
| Batch Enabling Instance Protection | hcloud AS BatchProtectScalingInstances | This API is used to enable protection for instances in an AS group in a batch. | |
| Batch Disabling Instance Protection | hcloud AS BatchUnprotectScalingInstances | This API is used to disable protection for instances in an AS group in a batch. | |
| Batch Setting Instances to Standby | hcloud AS BatchSetScalingInstancesStandby | This API is used to set instances in an AS group to the standby mode in a batch. | |
| Batch Canceling Standby Mode for Instances | hcloud AS BatchUnsetScalingInstancesStantby | This API is used to cancel the standby mode for instances in an AS group in a batch. |
AS Policies
| API Name | Command | Description | Operation |
|---|---|---|---|
| Creating an AS Policy | hcloud AS CreateScalingPolicy | This API is used to create an AS policy.
| |
| Querying Details About an AS Policy | hcloud AS ShowScalingPolicy | This API is used to query details about a specified AS policy. | |
| Modifying an AS Policy | hcloud AS UpdateScalingPolicy | This API is used to modify a specified AS policy. | |
| Deleting an AS Policy | hcloud AS DeleteScalingPolicy | This API is used to delete a specified AS policy. | |
| Querying AS Policies | hcloud AS ListScalingPolicies | 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. | |
| Batch Deleting AS Policies | hcloud AS BatchDeleteScalingPolicies | This API is used to delete AS policies in a batch. A maximum of 20 AS policies can be deleted in a batch at a time. | |
| Batch Disabling AS Policies | hcloud AS BatchPauseScalingPolicies | This API is used to disable AS policies in a batch. A maximum of 20 AS policies can be disabled in a batch at a time. | |
| Batch Enabling AS Policies | hcloud AS BatchResumeScalingPolicies | This API is used to enable AS policies in a batch. A maximum of 20 AS policies can be enabled in a batch at a time. | |
| Executing an AS Policy | hcloud AS ExecuteScalingPolicy | This API is used to execute a specified AS policy immediately. An AS policy can be executed only when the AS group and AS policy are in the INSERVICE state. Otherwise, the execution fails. | |
| Enabling an AS Policy | hcloud AS ResumeScalingPolicy | This API is used to enable a specified AS policy immediately. An AS policy can be executed only when the AS group and AS policy are in the INSERVICE state. Otherwise, the execution fails. | |
| Disabling an AS Policy | hcloud AS PauseScalingPolicy | This API is used to disable a specified AS policy immediately. An AS policy can be executed only when the AS group and AS policy are in the INSERVICE state. Otherwise, the execution fails. |
AS Policies (V2)
| API Name | Command | Description | Operation |
|---|---|---|---|
| Querying All AS Policies (V2) | hcloud AS ListAllScalingV2Policies | This API is used to query all AS policies for a tenant based on search criteria. The results are displayed by page. Search criteria can be the AS resource ID, AS resource type, AS policy name, AS policy ID, alarm ID, enterprise project ID, start line number, number of records, and sorting method. If no search criteria are specified, a maximum of 20 AS policies can be queried for a tenant by default. | |
| Creating an AS Policy (V2) | hcloud AS CreateScalingV2Policy | This API is used to create an AS policy for an AS group or bandwidth. The difference between the V2 and V1 APIs for creating an AS policy is that V2 supports creating an AS policy for adjusting bandwidth and differentiating scaling resources by their types. | |
| Querying Details About an AS Policy (V2) | hcloud AS ShowScalingV2Policy | This API is used to query details about a specified AS policy. | |
| Modifying an AS Policy (V2) | hcloud AS UpdateScalingV2Policy | This API is used to modify a specified AS policy. The difference between the V2 and V1 APIs for modifying an AS policy is that V2 supports modifying a scaling resource type. | |
| Querying AS Policies (V2) | hcloud AS ListScalingV2Policies | This API is used to query AS policies based on search criteria. The results are displayed by page. The difference between the V2 and V1 APIs for querying AS policies is that V2 contains scaling resource types in response messages. 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 specified resources can be queried for a tenant by default. |
AS Groups
| API Name | Command | Description | Operation |
|---|---|---|---|
| Querying AS Groups | hcloud AS ListScalingGroups | This API is used to query AS groups based on search criteria. The results are displayed by page. Search criteria can be the AS group name, AS configuration ID, AS group status, enterprise project ID, start line number, and number of records. If no search criteria are specified, a maximum of 20 AS groups can be queried by default. | |
| Creating an AS Group | hcloud AS CreateScalingGroup | An AS group is a collection of instances that are used in the same scenario. It is the basis for enabling or disabling AS policies and performing scaling actions. An AS group specifies parameters, such as the maximum number of instances, expected number of instances, minimum number of instances, VPC, subnet, and load balance settings. By default, a maximum of 10 AS groups can be created. | |
| Querying Details About an AS Group | hcloud AS ShowScalingGroup | This API is used to query details about a specified AS group. | |
| Modifying an AS Group | hcloud AS UpdateScalingGroup | This API is used to modify a specified AS group.
| |
| Deleting an AS Group | hcloud AS DeleteScalingGroup | This API is used to delete a specified AS group. | |
| Enabling an AS Group | hcloud AS ResumeScalingGroup | This API is used to enable a specified AS group. | |
| Disabling an AS Group | hcloud AS PauseScalingGroup | This API is used to disable a specified AS group. For a disabled AS group, AS does not automatically trigger any scaling actions. When an AS group has an in-progress scaling action, the scaling action does not stop immediately after the AS group is disabled. | |
| Querying Details About a Warm Pool | hcloud AS ShowWarmPool | This API is used to query details about a warm pool. | |
| Enabling a Warm Pool | hcloud AS PutWarmPool | This API is used to enable and configure a warm pool. | |
| Disabling a Warm Pool | hcloud AS CloseWarmPool | This API is used to disable the warm pool of an AS group. | |
| Querying Instances in a Warm Pool | hcloud AS ListWarmPoolInstances | This API is used to query instances in a warm pool. | |
| Querying Details About a Warm Pool (V2) | hcloud AS ShowWarmPoolNew | This API is used to query details about a warm pool. | |
| Enabling a Warm Pool (V2) | hcloud AS PutWarmPoolNew | This API is used to enable and configure a warm pool. | |
| Disabling a Warm Pool (V2) | hcloud AS CloseWarmPoolNew | This API is used to disable the warm pool of an AS group. | |
| Querying Instances in a Warm Pool (V2) | hcloud AS ListWarmPoolInstancesNew | This API is used to query instances in a warm pool. |
AS Configurations
| API Name | Command | Description | Operation |
|---|---|---|---|
| Querying AS Configurations | hcloud AS ListScalingConfigs | This API is used to query AS configurations based on search criteria. The results are displayed by page.
| |
| Creating an AS Configuration | hcloud AS CreateScalingConfig | This API is used to create an AS configuration. An AS configuration is an ECS template in the AS group, specifying specifications of the ECS to be added. The AS configuration is decoupled from the AS group. An AS configuration can be used by multiple AS groups. By default, a maximum of 100 AS configurations can be created. | |
| Querying Details About an AS Configuration | hcloud AS ShowScalingConfig | This API is used to query details about an AS configuration based on the AS configuration ID. | |
| Modifying an AS Configuration | hcloud AS UpdateScalingConfig | This API is used to modify an AS configuration. | |
| Deleting an AS Configuration | hcloud AS DeleteScalingConfig | This API is used to delete a specified AS configuration. | |
| Batch Deleting AS Configurations | hcloud AS BatchDeleteScalingConfigs | This API is used to delete AS configurations in a batch. AS configurations used by AS groups cannot be deleted. A maximum of 50 AS configurations can be deleted at a time. |
Tags
| API Name | Command | Description | Operation |
|---|---|---|---|
| Querying Tags | hcloud AS ListScalingTagInfosByTenantId | This API is used to query tags of a specific type of resource in a project. | |
| Querying Tags of a Resource | hcloud AS ListScalingTagInfosByResourceId | This API is used to query tags of a specified resource in a project. | |
| Querying Resources by Tag | hcloud AS ListResourceInstances | This API is used to query resources in a project by tag. By default, resources and resource tags are in descending order of their creation time. | |
| Creating a Tag | hcloud AS CreateScalingTagInfo | This API is used to create a tag for a specified resource. | |
| Deleting a Tag | hcloud AS DeleteScalingTagInfo | This API is used to delete a tag from a specified resource. |
Lifecycle Hooks
| API Name | Command | Description | Operation |
|---|---|---|---|
| Creating a Lifecycle Hook | hcloud AS CreateLifyCycleHook | This API is used to create a lifecycle hook. You can add one or more lifecycle hooks to an AS group. A maximum of five lifecycle hooks can be added.
| |
| Querying Lifecycle Hooks | hcloud AS ListLifeCycleHooks | This API is used to query lifecycle hooks by AS group ID. | |
| Querying Details About a Lifecycle Hook | hcloud AS ShowLifeCycleHook | This API is used to query details about a specified lifecycle hook by AS group ID and lifecycle hook name. | |
| Modifying a Lifecycle Hook | hcloud AS UpdateLifeCycleHook | This API is used to modify a specified lifecycle hook. | |
| Deleting a Lifecycle Hook | hcloud AS DeleteLifecycleHook | This API is used to delete a specified lifecycle hook. When a scaling action is being performed in an AS group, the lifecycle hooks of the AS group cannot be deleted. | |
| Calling Back a Lifecycle Hook | hcloud AS AttachCallbackInstanceLifeCycleHook | This API is used to call back the lifecycle hook specified by a scaling instance based on the lifecycle action key or based on the instance ID and lifecycle hook name.
| |
| Querying Instance Suspension | hcloud AS ListHookInstances | After a lifecycle hook is added, when an AS group performs a scaling action, the lifecycle hook suspends the target instance and sets it to be in waiting state. You can query the instance suspension based on search criteria.
|
Scheduled Tasks
| API Name | Command | Description | Operation |
|---|---|---|---|
| Querying Scheduled Tasks | hcloud AS ListGroupScheduledTasks | This API is used to query scheduled tasks. | |
| Creating a Scheduled Task | hcloud AS CreateGroupScheduledTask | This API is used to create a scheduled task. | |
| Updating a Scheduled Task | hcloud AS UpdateGroupScheduledTask | This API is used to update a scheduled task. | |
| Deleting a Scheduled Task | hcloud AS DeleteGroupScheduledTask | This API is used to delete a scheduled task. |
Notifications
| API Name | Command | Description | Operation |
|---|---|---|---|
| Querying Notifications of an AS Group | hcloud AS ListScalingNotifications | This API is used to query notifications of an AS group by group ID. | |
| Configuring a Notification for an AS Group | hcloud AS CreateScalingNotification | This API is used to configure a notification for an AS group. Each time this API is called, the AS group adds a notification topic and scenario. A maximum of five topics can be added for each AS group. The notification topic is pre-configured and subscribed by you in SMN. When the live network complies with the notification scenario that matches the notification topic, the AS group sends a notification to your subscription endpoints. | |
| Deleting a Notification from an AS Group | hcloud AS DeleteScalingNotification | This API is used to delete a notification from a specified AS group. |
Quotas
| API Name | Command | Description | Operation |
|---|---|---|---|
| Querying Quotas | hcloud AS ShowResourceQuota | This API is used to query the total quotas and used quotas of AS groups, AS configurations, bandwidth scaling policies, AS policies, and instances for a specified tenant. | |
| Querying AS Policy and Instance Quotas | hcloud AS ShowPolicyAndInstanceQuota | This API is used to query the total quotas and used quotas of AS policies and instances of a specified AS group by group ID. |
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot