All Products
Search
Document Center

Key Management Service:SyncCluster

Last Updated:Apr 17, 2025

Synchronizes the data of hardware security modules (HSMs) in a cluster.

Operation description

  • This operation is used for manually synchronizing data within clusters located in the Chinese Mainland. For clusters outside the Chinese Mainland, automatic data synchronization is supported, and this operation is unnecessary. If you attempt to use this operation, a 400 error code will be returned.
  • The data synchronization takes approximately 5 minutes. To avoid service interruptions, we recommend performing this operation during off-peak hours.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
yundun-hsm:SyncClusterupdate
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ClusterIdstringYes

The ID of the cluster.

cluster-BqxX63Bsgytet****

Response parameters

ParameterTypeDescriptionExample
object

PlainResult

RequestIdstring

The request ID.

4C467B38-3910-447D-87BC-AC049166F216
Jobobject

The details of the task.

JobIdstring

The ID of the task.

job-000bu7m5vjmyz9s7qz85
Typestring

The operation type. Valid values:

  • create
  • cancel
create
Completedboolean

Indicates whether the task is complete. Valid values:

  • true
  • false
true
CreateTimestring

The time when the task was created. Unit: milliseconds. The value is a UNIX timestamp.

1711764127000
Statusstring

The status of the task. Valid values:

  • success
  • running
  • cancel
  • fail
success
Responsestring

The response returned after the task succeeds.

success
Errorstring

The error message returned if the task fails.

OperationTimeout
Progressinteger

The progress of the task. Unit: percent (%).

90

Examples

Sample success responses

JSONformat

{
  "RequestId": "4C467B38-3910-447D-87BC-AC049166F216",
  "Job": {
    "JobId": "job-000bu7m5vjmyz9s7qz85",
    "Type": "create",
    "Completed": true,
    "CreateTime": "1711764127000",
    "Status": "success",
    "Response": "success",
    "Error": "OperationTimeout",
    "Progress": 90
  }
}

Error codes

HTTP status codeError codeError messageDescription
400SwitchMaster.InstanceInvalidInstance not in the cluster.-
400LeaveCluster.MasterLastMaster instance can not leave a cluster until all other instances are left.-
400Certificate.ChainInvalidCertificate chain invalid. Please make sure issuer certificate is the trust anchor and cluster certificate is signed by issuer certificate.-
400Certificate.FormatInvalidCertificate format invalid. Cluster/Issuer certificate must be in PEM format.-
400ConfigClusterSubnet.DuplicateZoneVSwitches should not contain duplicate zones.-
400InvalidApiParam.Errorapi param is invalid-
400InvalidClusterNameInvalid parameter clusterName.-
400InvalidPageSizeInvalid parameter pageSize.-
400InvalidCurrentPageInvalid parameter currentPage.-
400InvalidRegionIdInvalid parameter regionId.-
400InvalidVSwitchInvalid parameter vSwitch.-
400InvalidVpcInvalid parameter vpcId.-
400InvalidIpInvalid parameter IP.-
400InvalidAliuidInvalid parameter aliuid.-
400InvalidClusterIdInvalid parameter clusterId.-
400InvalidInstanceIdInvalid parameter instanceId.-
400InvalidBackupIdInvalid parameter backupId.-
400InvalidImageIdInvalid parameter imageId.-
400HsmInstanceNotExist.Errorhsm instance not exist-
400HSMIntanceNotActived.Errorhsm intance is not actived-
400WhiteListMaxCount.Errorwhilte list is more than max count-
400ClusterIdIsNotExists.Errorcluster ID non-exists-
400InstanceListIsEmpty.Errorinstance list is empty-
400InstanceIdIsEmpty.Errorinstance id is empty-
400InstanceIsNotExistsInCluster.Errorcluster has no such instance-
400InstanceIsExistsInCluster.Errorinstance already in the cluster-
400RegionNoEmpty.Errorregion no. is empty-
400ClusterNameEmpty.Errorempty cluster name not allowed-
400ClusterNameIsExists.Errorthe cluster name is already taken-
400IpNotValid.Errorip not valid-
400ClusterIsEmpty.Errorcluster is empty-
400NoMasterFoundInCluster.Errorcluster has no master instance-
400HsmInstanceIdNotFound.Errorno such instance-
400NoInstanceFoundInCluster.Errorcluster is empty-
400Whitelist.InvalidWhitelist blocks not in CIDR format.-
400Whitelist.TooLongWhitelist too long, exceeds 10 CIDR blocks.-
403Cluster.CN.ClusterModeInvalidThis API is forbidden for current cluster mode.-
403NoPermissionCaller has no permission on the resource.-
403InstanceNotPausedPlease pause the instance before reset.-
403InstanceNotActiveInstance is not active.-
403ConfigIp.IncorrectStateInstance not in pending or active state, can not config IP address.-
403SwitchMaster.IncorrectStateCluster not initialized, please initialize the cluster first.-
403SyncCluster.IncorrectStateCluster not initialized, please initialize the cluster first.-
403LeaveCluster.InstanceInvalidThe instance is not in the cluster.-
403DeleteCluster.IncorrectStateCluster not empty, please remove all instances first.-
403JoinCluster.InstanceVSwitchNotInClusterInstance's vSwitch is not in cluster config, please change instance's vSwitch first.-
403JoinCluster.InstanceInitializedInitialized instance can not join a cluster.-
403JoinCluster.IncorrectStateCluster not initialized, please initialize the cluster first.-
403InitializeCluster.InstanceNotInitializedCluster master instance not initialized, please initialize cluster master instance first.-
403InitializeCluster.IncorrectConfigCluster subnet not configured, please config cluster subnet first.-
403InitializeCluster.IncorrectStateCluster initialized, do not re-initialize.-
403Cluster.CN.ActionForbiddenThis API is forbidden for non-international site cluster.-
403Cluster.INTL.ActionForbiddenThis API is forbidden for international site cluster.-
403ConfigClusterCertificate.IncorrectStateCluster initialized or certificates already configured.-
403ConfigClusterSubnet.InvalidVpcIdVPC Id invalid. Cluster VPC is the same as cluster master's VPC.-
403ConfigClusterSubnet.InvalidVSwitchIdVSwitch Id invalid. VSwitches should contain all current cluster vSwitches.-
403ConfigClusterSubnet.IncorrectStateCluster not in NEW state, can not config cluster subnet.-
403ClusterName.ExistCluster name already exists, please use another name.-
403Whitelist.InstanceInClusterWhitelist.InstanceInCluster-
404Resource.NotFoundResource not found.-
405ClusterAPI.NotSupportedClusterAPI not supported in this region.-
409ConflictResource is being updated by a previous request. Current request is redundant.-
409Cluster.ConflictThe cluster is being updated by a previous request. Please try again later.-
500ConfigWhitelistFailed.Errorconfig white list error-
500ActionFailed.Errorinternal error, please try again-
500InternalErrorThe request processing has failed due to some unknown error.Unknown error caused request processing to fail.

For a list of error codes, visit the Service error codes.