查询镜像配置检查项检测报告 - ShowImageCheckRuleDetail
功能介绍
查询镜像配置检查项检测报告
授权信息
账号具备所有API的调用权限,如果使用账号下的IAM用户调用当前API,该IAM用户需具备调用API所需的权限。
- 如果使用角色与策略授权,具体权限要求请参见权限和授权项。
- 如果使用身份策略授权,当前API调用无需身份策略权限。
URI
GET /v5/{project_id}/image/baseline/check-rule/detail
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
project_id |
是 |
String |
项目ID |
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
enterprise_project_id |
否 |
String |
主机所属的企业项目ID。 开通企业项目功能后才需要配置企业项目。 企业项目ID默认取值为“0”,表示默认企业项目。如果需要查询所有企业项目下的主机,请传参“all_granted_eps”。如果您只有某个企业项目的权限,则需要传递该企业项目ID,查询该企业项目下的主机,否则会因权限不足而报错。 |
|
image_type |
是 |
String |
镜像类型,包含如下:
|
|
namespace |
否 |
String |
组织名称(没有镜像相关信息时,表示查询所有镜像) |
|
image_name |
否 |
String |
镜像名称 |
|
image_version |
否 |
String |
镜像版本名称 |
|
image_id |
否 |
String |
镜像id |
|
check_name |
是 |
String |
基线名称 |
|
check_type |
是 |
String |
基线类型 |
|
check_rule_id |
是 |
String |
检查项id |
|
standard |
是 |
String |
标准类型,包含如下:
|
|
instance_id |
否 |
String |
企业仓库实例ID,swr共享版无需使用该参数 |
请求参数
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
X-Auth-Token |
是 |
String |
用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值) |
|
region |
否 |
String |
Region ID |
响应参数
状态码:200
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
description |
String |
检查项描述 |
|
reference |
String |
参考 |
|
audit |
String |
审计描述 |
|
remediation |
String |
修改建议 |
|
check_info_list |
Array of ImageCheckRuleCheckCaseResponseInfo objects |
检测用例信息 |
请求示例
查询所属组织为aaa,镜像名称为centos7,镜像版本为common的私有镜像、基线名称为SSH、检测项id为1.12并且标准类型为华为规范的配置检查项检测报告。
GET https://{endpoint}/v5/{project_id}/image/baseline/check-rule/detail?image_type=private_image&namespace=aaa&image_name=centos7&image_version=common&check_rule_id=1.12&standard=hw_standard&check_type=SSH&check_name=SSH&enterprise_project_id=all_granted_eps
响应示例
状态码:200
请求已成功
{"audit":"检查配置文件/etc/pam.d/system","check_info_list":[{"check_description":"检查配置文件/etc/pam.d/system-auth"},{"current_value":""},{"suggest_value":"每个文件都配置auth required "}],"description":"The two options ClientAliveInterval and ClientAliveCountMax control the timeout of SSH sessions. The ClientAliveInterval parameter sets a timeout interval in seconds after which if no data has been received from the client, sshd will send a message through the encrypted channel to request a response from the client. The ClientAliveCountMax parameter sets the number of client alive messages which may be sent without sshd receiving any messages back from the client. For example, if the ClientAliveInterval is set to 15s and the ClientAliveCountMax is set to 3, unresponsive SSH clients will be disconnected after approximately 45s.","reference":"","remediation":"Edit the /etc/ssh/sshd_config file to set the parameter as follows:
ClientAliveInterval 300
ClientAliveCountMax 0"}
状态码
|
状态码 |
描述 |
|---|---|
|
200 |
请求已成功 |
错误码
请参见错误码。