Updated on 2025-09-19 GMT+08:00

Adding a Scheduled Plan for Adding or Deleting a Logical Cluster

Function

This API is used to add a scheduled plan for adding or deleting a logical cluster.

Calling Method

For details, see Calling APIs.

URI

POST /v1/{project_id}/clusters/{cluster_id}/logical-cluster-plans

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

cluster_id

Yes

String

Definition

Cluster ID. For details about how to obtain the value, see Obtaining the Cluster ID.

Constraints

N/A

Range

N/A

Default Value

N/A

project_id

Yes

String

Definition

Project ID. To obtain the value, see Obtaining a Project ID.

Constraints

N/A

Range

N/A

Default Value

N/A

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

logical_cluster_name

No

String

Definition

Logical cluster name.

Constraints

N/A

Range

N/A

Default Value

N/A

user

No

String

Definition

User bound to the logical cluster. If the primary logical cluster has been bound, a user cannot be bound.

Constraints

N/A

Range

N/A

Default Value

N/A

node_num

No

Integer

Definition

Number of nodes in the logical cluster.

Constraints

N/A

Range

N/A

Default Value

N/A

main_logical_cluster

No

String

Definition

Primary logical cluster bound to the logical cluster. If a user is bound, the primary logical cluster cannot be bound.

Constraints

N/A

Range

N/A

Default Value

N/A

plan_type

Yes

String

Definition

Plan type. The value can be once or periodicity.

Constraints

N/A

Range

once: one-off plan

periodicity: periodic plan

Default Value

N/A

start_time

No

String

Definition

Start time of the scheduled plan for adding or deleting a logic cluster.

Constraints

N/A

Range

N/A

Default Value

N/A

end_time

No

String

Definition

End time of the scheduled plan for adding or deleting a logic cluster.

Constraints

N/A

Range

N/A

Default Value

N/A

actions

Yes

Array of LogicalClusterPlanActionsParam objects

Definition

Details of the scheduled plan for adding or deleting a logic cluster.

Constraints

N/A

Range

N/A

Default Value

N/A

Table 3 LogicalClusterPlanActionsParam

Parameter

Mandatory

Type

Description

type

Yes

String

Definition

Type. The value can be create or delete.

Constraints

N/A

Range

create

delete

Default Value

N/A

strategy

No

String

Definition

The time and date for the task to run. Cron policy expression: for example, "0 0 0? * 3".

Constraints

N/A

Range

N/A

Default Value

N/A

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

plan_id

String

Definition

ID of the plan for adding or deleting a logical cluster.

Range

N/A

Example Requests

Add a scheduled plan for adding or deleting a logical cluster.

POST https://{Endpoint}/v1/89cd04f168b84af6be287f71730fdb4b/clusters/4ca46bf1-5c61-48ff-b4f3-0ad4e5e3ba90/logical-cluster-plans

{
  "logical_cluster_name" : "LC_0218",
  "node_num" : 3,
  "plan_type" : "once",
  "user" : "",
  "actions" : [ {
    "type" : "delete",
    "strategy" : 1740037020000
  } ],
  "main_logical_cluster" : null
}

Example Responses

Status code: 200

Scheduled plan for adding or deleting a logical cluster added.

{
  "plan_id" : "03eaf309-2d91-4b28-a93c-0a45980d3192"
}

Status Codes

Status Code

Description

200

Scheduled plan for adding or deleting a logical cluster added.

400

Request error.

401

Authentication failed.

403

You do not have required permissions.

404

No resources found.

500

Internal server error.

503

Service unavailable.