Updated on 2026-09-03 GMT+08:00

Automatically create an agency.

Function

If the built-in CSS agency does not exist, the system automatically creates an agency and grants the permissions required by CSS to it.

If the built-in CSS agency exists, the system removes high-risk permissions and sets the minimal permissions.

Calling Method

For details, see Calling APIs.

URI

POST /v1.0/{project_id}/agency/create

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID. For details about how to obtain the project ID and name, see Obtaining the Project ID and Name.

Constraints

N/A

Range

Project ID of an account. The value contains 32 characters, consisting of lowercase letters and digits.

Default Value

N/A

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

domain_id

Yes

String

Definition

Account ID. For details, see Querying Projects Based on Specified Criteria.

Constraints

N/A

Range

N/A

Default Value

N/A

domain_name

Yes

String

Definition

Account name. For details, see Authentication.

Constraints

N/A

Range

N/A

Default Value

N/A

type

Yes

String

Definition:

Type of the agency to be created.

Constraints:

N/A.

Value range:

  • obs: agency permissions required for creating snapshots and log backups.

  • vpc: agency permissions required for version upgrade, AZ change, scale-in, and node replacement.

  • smn: agency permissions required for using the alerting plug-in.

  • elb: agency permissions required for using load balancing.

Default value:

N/A.

Response Parameters

Status code: 200

Request succeeded.

None

Example Requests

Example of the request for creating an agency used to create snapshots and log backups.

POST https://{Endpoint}/v1.0/{project_id}/agency/create

{
  "domain_id" : "id",
  "domain_name" : "name",
  "type" : "obs"
}

Example Responses

None

Status Codes

Status Code

Description

200

Request succeeded.

400

The request is invalid.

Modify the request and then try again.

403

The request is rejected.

The server has received the request and understood it, but the server refuses to respond to it. The client should not repeat the request without modifications.

Error Codes

See Error Codes.