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

CLI Command Reference

Lifecycle Management

API Name

Command

Description

Operation

Creating a Secret

hcloud CSMS CreateSecret

You can create a secret and store its value in its original version.

Go debug

Querying the Secret List

hcloud CSMS ListSecrets

This API is used to query all secrets created by the current user in the current project.

Go debug

Querying a Secret

hcloud CSMS ShowSecret

This API is used to query information about a specified secret.

Go debug

Updating a Secret

hcloud CSMS UpdateSecret

Updates the metadata of a specified secret.

Go debug

Deleting a Secret Immediately

hcloud CSMS DeleteSecret

The specified secret is deleted immediately and cannot be restored.

Go debug

Restoring a Secret Object

hcloud CSMS UploadSecretBlob

Restore the secret object by uploading the secret backup file.

Go debug

Downloading Secret Backup

hcloud CSMS DownloadSecretBlob

Download the backup file of a specified secret.

Go debug

Creating a Scheduled Secret Deletion Task

hcloud CSMS DeleteSecretForSchedule

Specify the deletion delay time and create a scheduled task for deleting secrets. You can set the deletion delay time to 7 to 30 days.

Go debug

Canceling a Scheduled Secret Deletion Task

hcloud CSMS RestoreSecret

The scheduled secret deletion task is canceled, and the secret object is restored to the available state.

Go debug

Rotating a Secret

hcloud CSMS RotateSecret

Executes rotation secrets immediately. Creates a new secret version in the specified secret to encrypt and store secret values randomly generated in the background. At the same time, the newly created secret version is marked as SYSCURRENT.

Go debug

Import secrets in batches

hcloud CSMS BatchImportSecrets

Import secrets in batches.

Go debug

Secret Version Management

API Name

Command

Description

Operation

Updating the Secret Version

hcloud CSMS UpdateVersion

Currently, the validity period of a specified secret version can be updated. Only secrets in the ENABLED state can be updated. If the associated subscription events contain the basic event type Version Expiration, only one event notification is triggered each time the version validity period is updated.

Go debug

Querying the Secret Version and Value

hcloud CSMS ShowSecretVersion

This API is used to query information about a specified secret version and plaintext secret values in the version. Only secrets in the ENABLED state can be queried.

Go debug

Secret Version Status Management

API Name

Command

Description

Operation

Updating the Version Status of a Secret

hcloud CSMS UpdateSecretStage

Update the version status of a secret.

Go debug

Querying the Version Status of a Secret

hcloud CSMS ShowSecretStage

Queries the version information of a specified secret version status flag.

Go debug

Deleting the Version Status of a Secret

hcloud CSMS DeleteSecretStage

Deletes the status of a specified secret version.

Go debug

Secret Tag Management

API Name

Command

Description

Operation

Querying a Secret Instance

hcloud CSMS ListResourceInstances

This API is used to query secret instances. Filters user secret by tag and returns the secret list.

Go debug

Adding or Deleting Secret Tags in Batches

hcloud CSMS BatchCreateOrDeleteTags

This API is used to add or delete secret tags in batches.

Go debug

Querying Secret Tags

hcloud CSMS ListSecretTags

This API is used to query secret tags.

Go debug

Querying Secret Tags

hcloud CSMS CreateSecretTag

Add a secret tag.

Go debug

Deleting a Secret Tag

hcloud CSMS DeleteSecretTag

This API is used to delete a secret tag.

Go debug

Querying Project Tags

hcloud CSMS ListProjectSecretsTags

This API is used to query all secret tags of a user in a specified project.

Go debug

User Management

API Name

Command

Description

Operation

Query user list

hcloud CSMS ListUsers

Query user list

Go debug

Show user detail

hcloud CSMS ShowUserDetail

This interface is used to query user details based on the user id.

Go debug

Changing User Password

hcloud CSMS UpdateUserPassword

Changing a User Password.

Go debug

Event Management

API Name

Command

Description

Operation

Creating an Event

hcloud CSMS CreateSecretEvent

Creates an event that can be configured on one or more secret objects. When an event is enabled and the basic event type contained in the event is triggered on the secret object, the cloud service sends the corresponding event notification to the notification topic specified by the event.

Go debug

Querying the Event List

hcloud CSMS ListSecretEvents

This API is used to query all events created by the current user in the project.

Go debug

Querying Events

hcloud CSMS ShowSecretEvent

This API is used to query information about a specified event.

Go debug

Update an Event

hcloud CSMS UpdateSecretEvent

This API is used to update the metadata of a specified event. Metadata that can be updated includes the event enabling status, basic type list, and notification topic.

Go debug

Deleting an Event Immediately

hcloud CSMS DeleteSecretEvent

The specified event is deleted immediately and cannot be restored. If an event is referenced by a secret, the event cannot be deleted. Disassociate the event from the secret first.

Go debug

Querying Triggered Event Notification Records

hcloud CSMS ListNotificationRecords

Query all event notification records that have been triggered in the last three months.

Go debug

Secret Rotation Management

API Name

Command

Description

Operation

Query the task list.

hcloud CSMS ListSecretTask

Query the task list.

Go debug

Create a service agency.

hcloud CSMS CreateAgency

Create a service agency. Used to create secret management Service-related agencies and FunctionWorkflow-related agencies.

Go debug

Show agencies.

hcloud CSMS ShowAgency

Show agencies.

Go debug

Obtains the secret rotation function template.

hcloud CSMS ShowSecretFunctionTemplates

Obtains the secret rotation function template.

Go debug

Grants Management

API Name

Command

Description

Operation

Grants List

hcloud CSMS ListGrants

Grants List

Go debug

Update Grants

hcloud CSMS UpdateGrant

Update Grants

Go debug

Create Grants

hcloud CSMS CreateGrants

Create Grants

Go debug

Delete Grant

hcloud CSMS DeleteGrant

Delete Grant

Go debug

Password Management

API Name

Command

Description

Operation

Generating a Random Password

hcloud CSMS GenerateRandomPassword

Generate Random Password

Go debug

Secret version management

API Name

Command

Description

Operation

Creating a Secret Version

hcloud CSMS CreateSecretVersion

Creates a new secret version in the specified secret to encrypt and keep the new secret value. By default, The latest secret version in SYSCURRENT state. The previous version is in the SYSPREVIOUS state. You can overwrite the default behavior by specifying the VersionStage parameter.

Go debug

Querying the Secret Version List

hcloud CSMS ListSecretVersions

This API is used to query the version list of a specified secret.

Go debug

Secrets Checking Management

API Name

Command

Description

Operation

Check the Secret Strength of Incoming Secret

hcloud CSMS CheckSecrets

Check the Secret Strength of Incoming Secret.

Go debug

Get the Secrets Checking Configuration for a Tenant

hcloud CSMS ShowSecretsConfig

Get the Secrets Checking Configuration for a Tenant.

Go debug

Update the Secrets Checking Configuration for a Tenant

hcloud CSMS UpdateSecretsConfig

Update the Secrets Checking Configuration for a Tenant.

Go debug