获取证书分布统计信息 - ShowStatisticCertificate
功能介绍
获取CPCS中证书分布统计信息
调用方法
请参见如何调用API。
授权信息
账号具备所有API的调用权限,如果使用账号下的IAM用户调用当前API,该IAM用户需具备调用API所需的权限。
- 如果使用角色与策略授权,具体权限要求请参见权限和授权项。
- 如果使用身份策略授权,需具备如下身份策略权限。
授权项
访问级别
资源类型(*为必须)
条件键
别名
依赖的授权项
cpcs::getStatisticCertificate
Read
-
-
cpcs:system:getStatisticCertificate
-
URI
GET /v1/{project_id}/dew/cpcs/certificate/statistic
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| project_id | 是 | String | 项目id |
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| cluster_id | 否 | String | 集群id,默认为空,默认查询所有集群 |
| app_id | 否 | String | 应用id,默认为空,默认查询所有app |
| from | 否 | Long | 查询的初始时间戳,毫秒级时间戳,默认查询前三天 |
| to | 否 | Long | 查询的终止时间戳,毫秒级时间戳,默认查询到当前时间 |
| period | 否 | Integer | 统计周期,默认为1,五分钟为一个周期 |
| filter | 否 | String | 统计值,默认为min:最小值 |
| algorithm | 否 | String | 算法,有:“sm2”,"rsa" |
| algorithm_type | 否 | String | 算法类型,0:国密算法,1:国际算法 |
| certificate_type | 否 | String | 证书类型,0:根证书,1:业务证书 |
| server_type | 否 | String | 密码服务类型 |
请求参数
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| X-Auth-Token | 是 | String | 用户token,参见:IAM token获取方法 |
响应参数
状态码:200
| 参数 | 参数类型 | 描述 |
|---|---|---|
| metric_name | String | 资源名称 |
| certificate_classified_counts | Array of VendorCertificateStatistic objects | 证书分布按算法和证书类型统计 |
| certificate_counts_by_server_type | Array of VendorCertificateStatistic objects | 证书分布按服务类型统计 |
请求示例
证书分布
GET https://cpcs.com/v1/{project_id}/dew/cpcs/certificate/statistic 响应示例
状态码:200
正常返回
{
"metric_name" : "证书分布",
"certificate_classified_counts" : [ {
"count" : 1,
"tenant_id" : "3bab8e245e854f68af5967c00dd43127",
"cluster_id" : "7a132653d38b4f66a4839d10a6dc785f",
"server_type" : "SSL_VPN",
"certificate_type" : 0,
"algorithm_type" : 0
} ],
"certificate_counts_by_server_type" : [ {
"count" : 4,
"tenant_id" : null,
"cluster_id" : null,
"server_type" : "SSL_VPN",
"certificate_type" : 1,
"algorithm_type" : 0
} ]
} 状态码
| 状态码 | 描述 |
|---|---|
| 200 | 正常返回 |
错误码
请参见错误码。