ListInstances - 查询实例列表

获取符合查询条件的实例集合。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。

  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。

  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:

    • 对于必选的资源类型,用前面加 * 表示。

    • 对于不支持资源级授权的操作,用全部资源表示。

  • 条件关键字:是指云产品自身定义的条件关键字。

  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。

操作

访问级别

资源类型

条件关键字

关联操作

yundun-hsm:ListInstances

get

*全部资源

*

请求参数

名称

类型

必填

描述

示例值

RegionId

string

地域 ID。

cn-hangzhou

CurrentPage

integer

当前页数。

1

PageSize

integer

每页查询数目。取值:1~1000。

20

TenantIsolationType

string

密码机硬件隔离类型,枚举值"vsm"虚拟密码机,"hostedHsm"托管硬件密码机

返回参数

名称

类型

描述

示例值

object

OpenApiPageResult

Total

integer

实例总条数。

80

PageSize

integer

每页查询数目。

20

CurrentPage

integer

当前页数。

1

RequestId

string

本次调用请求的 ID,是由阿里云为该请求生成的唯一标识符,可用于排查和定位问题。

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

Instances

array<object>

实例列表。

object

实例信息。

InstanceId

string

密码机实例 ID。

hsm-cn-vj30bil8****

Status

string

实例状态。

  • PENDING:未启用

  • ACTIVE:已启用

  • EXPIRED:已过期

  • INVALID:已失效

  • FAILURE:生产失败

  • RESET:重置中

  • PAUSED:已停用

  • MODIFYING:变更中

ACTIVE

示例

正常返回示例

JSON格式

{
  "Total": 80,
  "PageSize": 20,
  "CurrentPage": 1,
  "RequestId": "4C467B38-3910-447D-87BC-AC049166F216",
  "Instances": [
    {
      "InstanceId": "hsm-cn-vj30bil8****",
      "Status": "ACTIVE"
    }
  ]
}

错误码

HTTP status code

错误码

错误信息

描述

400 InvalidTenantIsolationType.Error Invalid parameter tenantIsolationType. It must be: null, hostedHsm, or vsm.
400 InvalidApiParam.Error api param is invalid
400 HsmInstanceNotExist.Error hsm instance not exist
400 HSMIntanceNotActived.Error hsm intance is not actived
400 WhiteListMaxCount.Error whilte list is more than max count
400 ClusterIdIsNotExists.Error cluster ID non-exists
400 InstanceListIsEmpty.Error instance list is empty
400 InstanceIdIsEmpty.Error instance id is empty
400 InstanceIsNotExistsInCluster.Error cluster has no such instance
400 InstanceIsExistsInCluster.Error instance already in the cluster
400 RegionNoEmpty.Error region no. is empty
400 ClusterNameEmpty.Error empty cluster name not allowed
400 ClusterNameIsExists.Error the cluster name is already taken
400 IpNotValid.Error ip not valid
400 ClusterIsEmpty.Error cluster is empty
400 NoMasterFoundInCluster.Error cluster has no master instance
400 HsmInstanceIdNotFound.Error no such instance
400 NoInstanceFoundInCluster.Error cluster is empty
400 Whitelist.Invalid Whitelist blocks not in CIDR format.
400 Whitelist.TooLong Whitelist too long, exceeds 10 CIDR blocks.
400 SwitchMaster.InstanceInvalid Instance not in the cluster.
400 LeaveCluster.MasterLast Master instance can not leave a cluster until all other instances are left.
400 Certificate.ChainInvalid Certificate chain invalid. Please make sure issuer certificate is the trust anchor and cluster certificate is signed by issuer certificate.
400 Certificate.FormatInvalid Certificate format invalid. Cluster/Issuer certificate must be in PEM format.
400 ConfigClusterSubnet.DuplicateZone VSwitches should not contain duplicate zones.
400 InvalidClusterName Invalid parameter clusterName.
400 InvalidPageSize Invalid parameter pageSize.
400 InvalidCurrentPage Invalid parameter currentPage.
400 InvalidRegionId Invalid parameter regionId.
400 InvalidZoneId Invalid parameter zoneId.
400 InvalidVSwitch Invalid parameter vSwitch.
400 InvalidVpc Invalid parameter vpcId.
400 InvalidVsmType Invalid parameter vsmType.
400 InvalidIp Invalid parameter IP.
400 InvalidAliuid Invalid parameter aliuid.
400 InvalidClusterId Invalid parameter clusterId.
400 InvalidInstanceId Invalid parameter instanceId.
400 InvalidBackupId Invalid parameter backupId.
400 InvalidImageId Invalid parameter imageId.
400 HSMIntanceActived.Error actived hsm instance can not release
400 ConfigIp.IpAlreadyInUse Ip is in use, can not config IP address.
400 ConfigIp.VpcIpNotMatched Vpc Ip must be in vpc network segment.
400 ConfigIp.IpOverFlow Vpc ip last place can not be in [253-255].
400 CanRefund.InstanceIdEmpty InstanceId is empty.
400 CanRefund.InstanceNotFound Instance Not Exist.
400 CanRefund.InstanceAlreadyReleased Instance already released.
400 CanRefund.AliUidEmpty AliUid empty.
400 CanRefund.NoSupportRefundOnline No support refund online.
500 ConfigWhitelistFailed.Error config white list error
500 ActionFailed.Error internal error, please try again
500 InternalError The request processing has failed due to some unknown error. 未知错误导致请求处理失败。
403 NoPermission Caller has no permission on the resource.
403 InstanceNotPaused Please pause the instance before reset.
403 Trial.Forbidden Current user is not allowed for trials!
403 Forbidden.InstanceInCluster This API is forbidden for instances in cluster.
403 JoinCluster.InstanceIncorrectState Instance not in Active/Pending state.
403 InstanceNotActive Instance is not active.
403 ConfigIp.IncorrectState Instance not in pending or active state, can not config IP address.
403 SwitchMaster.IncorrectState Cluster not initialized, please initialize the cluster first.
403 SyncCluster.IncorrectState Cluster not initialized, please initialize the cluster first.
403 LeaveCluster.InstanceInvalid The instance is not in the cluster.
403 DeleteCluster.IncorrectState Cluster not empty, please remove all instances first.
403 JoinCluster.InstanceVSwitchNotInCluster Instance's vSwitch is not in cluster config, please change instance's vSwitch first.
403 JoinCluster.InstanceInitialized Initialized instance can not join a cluster.
403 JoinCluster.IncorrectState Cluster not initialized, please initialize the cluster first.
403 InitializeCluster.InstanceNotInitialized Cluster master instance not initialized, please initialize cluster master instance first.
403 InitializeCluster.IncorrectConfig Cluster subnet not configured, please config cluster subnet first.
403 InitializeCluster.IncorrectState Cluster initialized, do not re-initialize.
403 Cluster.CN.ActionForbidden This API is forbidden for non-international site cluster.
403 Cluster.INTL.ActionForbidden This API is forbidden for international site cluster.
403 ConfigClusterCertificate.IncorrectState Cluster initialized or certificates already configured.
403 ConfigClusterSubnet.InvalidVpcId VPC Id invalid. Cluster VPC is the same as cluster master's VPC.
403 ConfigClusterSubnet.InvalidVSwitchId VSwitch Id invalid. VSwitches should contain all current cluster vSwitches.
403 ConfigClusterSubnet.IncorrectState Cluster not in NEW state, can not config cluster subnet.
403 ClusterName.Exist Cluster name already exists, please use another name.
403 Image.ImageStatusInValid Image status is invalid.
403 CopyImage.ImageAlreadyCopied Image already copied, secondary copy is not supported.
403 Image.ActionForbiddenINTL This API is forbidden for international site.
403 Image.ActionForbiddenCN This API is forbidden for non-international site.
403 CopyImage.RegionInvalid Source region or target region invalid.
403 Backup.ActionForbiddenINTL This API is forbidden for international site.
403 CopyImage.TargetRegionImageAlreadyExists Target region has the same digest image.
404 Resource.NotFound Resource not found.
405 ClusterAPI.NotSupported ClusterAPI not supported in this region.
409 Conflict Resource is being updated by a previous request. Current request is redundant.
409 ConfigIp.IncorrectState Instance not in pending or active state, can not config IP address.
409 Cluster.Conflict The cluster is being updated by a previous request. Please try again later.

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情