All Products
Search
Document Center

Key Management Service:GetCluster

Last Updated:Apr 17, 2025

Queries information about a specified cluster.

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:GetClusterget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ClusterIdstringYes

The ID of the cluster.

cluster-p94y1dud9ts****

Response parameters

ParameterTypeDescriptionExample
object

PlainResult

RequestIdstring

The request ID.

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

The cluster details.

ClusterIdstring

The ID of the cluster.

cluster-p94y1dud9ts****
ClusterNamestring

The name of the cluster.

cluster_polar_****
Statusstring

The status of the cluster. Valid values:

  • NEW: The cluster is not initialized.
  • INITIALIZED: The cluster is initialized.
  • DELETED: The cluster is deleted.
  • SYNCHRONIZING: The cluster is being synchronized.
  • TO_DELETE: The cluster is pending deletion.
NEW
CreateTimelong

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

1641275680000
RegionIdstring

The ID of the region in which the cluster resides.

cn-hangzhou
VpcIdstring

The ID of the virtual private cloud (VPC) to which the cluster belongs.

vpc-8vbt0fjdm29hofvbo****
Whiteliststring

The IP address whitelist of the cluster.

130.176.XX.XX
Zonesarray<object>

The information about the zones in which the cluster is deployed.

zoneobject

The zone.

VSwitchIdstring

The ID of the vSwitch.

vsw-uf61s651p69bdgmki****
ZoneIdstring

The ID of the zone.

cn-hangzhou-j
DeviceTypestring

The type of the device.

jnta
ClusterCsrstring

The certificate signing request (CSR) file of the cluster.

-----BEGIN CERTIFICATE REQUEST-----\nMIIC5TCCAc0CAQAwgZ8xWTAJBgNVBAYTAlVTMAkGA1UECAwCQ0EwDQYDVQQKDAZD\nYXZpdW0wDQYDVQQLDAZOM0ZJUFMwDgYDVQQHDAdTYW5Kb3NlMBMGA1UdEQwMMTk**** -----END CERTIFICATE REQUEST-----
ClusterCertificatestring

The cluster certificate.

-----BEGIN CERTIFICATE----- MIIDfTCCAmWgAwIBAgIJAMRqQMr5if66MA0GCSqGSIb3DQEBCwUAMFUxCzAJBgNV BAYTAmNuMQswCQYDVQQIDAJ6ajELMAkGA1UEBwwCaHoxFjAUBgNVBAoMDUFsaWJh YmEgQ2xvdWQxFDA**** -----END CERTIFICATE-----
ClusterOwnerCertificatestring

The self-signed certificate of the cluster.

----BEGIN CERTIFICATE----- MIIDaTCCAlECAQEwDQYJKoZIhvcNAQELBQAwVTELMAkGA1UEBhMCY24xCzAJBgNV BAgMAnpqMQswCQYDVQQHDAJoejEWMBQGA1UECgwNQWxpYmFiYSBDbG91ZDEUMBIG A1UECwwLU2VjQ2xvdWRIc20wHhcNMjQwNzAzM**** -----END CERTIFICATE-----
Sizeinteger

The number of hardware security modules (HSMs) in the cluster.

2
Instancesarray<object>

The HSMs in the cluster.

instanceobject

The information about the HSM.

InstanceIdstring

The ID of the HSM.

hsm-cn-g6z3v0uf****
NodeIdinteger

The ID of the HSM in the cluster.

1
Masterboolean

Indicates whether the HSM is a master HSM. Valid values:

  • true
  • false
true
ClusterModeinteger

The cluster mode.

2: automatically synchronizes the cluster.

2

Examples

Sample success responses

JSONformat

{
  "RequestId": "4C467B38-3910-447D-87BC-AC049166F216",
  "Cluster": {
    "ClusterId": "cluster-p94y1dud9ts****",
    "ClusterName": "cluster_polar_****",
    "Status": "NEW",
    "CreateTime": 1641275680000,
    "RegionId": "cn-hangzhou",
    "VpcId": "vpc-8vbt0fjdm29hofvbo****",
    "Whitelist": "130.176.XX.XX",
    "Zones": [
      {
        "VSwitchId": "vsw-uf61s651p69bdgmki****",
        "ZoneId": "cn-hangzhou-j"
      }
    ],
    "DeviceType": "jnta",
    "ClusterCsr": "-----BEGIN CERTIFICATE REQUEST-----\\nMIIC5TCCAc0CAQAwgZ8xWTAJBgNVBAYTAlVTMAkGA1UECAwCQ0EwDQYDVQQKDAZD\\nYXZpdW0wDQYDVQQLDAZOM0ZJUFMwDgYDVQQHDAdTYW5Kb3NlMBMGA1UdEQwMMTk****\n-----END CERTIFICATE REQUEST-----",
    "ClusterCertificate": "-----BEGIN CERTIFICATE-----\nMIIDfTCCAmWgAwIBAgIJAMRqQMr5if66MA0GCSqGSIb3DQEBCwUAMFUxCzAJBgNV\nBAYTAmNuMQswCQYDVQQIDAJ6ajELMAkGA1UEBwwCaHoxFjAUBgNVBAoMDUFsaWJh\nYmEgQ2xvdWQxFDA****\n-----END CERTIFICATE-----",
    "ClusterOwnerCertificate": "----BEGIN CERTIFICATE-----\nMIIDaTCCAlECAQEwDQYJKoZIhvcNAQELBQAwVTELMAkGA1UEBhMCY24xCzAJBgNV\nBAgMAnpqMQswCQYDVQQHDAJoejEWMBQGA1UECgwNQWxpYmFiYSBDbG91ZDEUMBIG\nA1UECwwLU2VjQ2xvdWRIc20wHhcNMjQwNzAzM****\n-----END CERTIFICATE-----",
    "Size": 2,
    "Instances": [
      {
        "InstanceId": "hsm-cn-g6z3v0uf****",
        "NodeId": 1,
        "Master": true
      }
    ],
    "ClusterMode": 2
  }
}

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.-
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.