云服务器内容精选

  • 后续处理 HiSec Endpoint Agent安装完成后,在线状态下会周期性检查云端是否有版本更新并自动升级。租户也可自行访问华为安全智能中心,对HiSec Endpoint Agent进行升级。升级完成后,HiSec Endpoint Agent自动启动,与云端保持连接,且HiSec Endpoint Agent的相关配置不会丢失。 HiSec Endpoint Agent的相关使用操作请参考“User Guide.pdf”。
  • 前提条件 已确认待安装HiSec Endpoint Agent的终端满足安装要求,具体要求如表1所示。 表1 终端约束与限制 终端类型 硬件要求 操作系统要求 CPU 内存 硬盘 PC 2核CPU 4GB及以上 可用磁盘空间不少于10GB Windows 7 专业版、旗舰版、企业版 (32/64位) Windows 10(32位/64位) Windows 11(64位) 银河麒麟桌面操作系统V10及以上 统信桌面操作系统V20以上 服务器 2核CPU 4GB及以上 可用磁盘空间不少于10GB Windows Server 2012 R2及以上(64位) CentOS 7及以上 RedHat 8及以上 Euler 2.0及以上 Debian 10及以上 SUSE 12/15 Ubuntu16/18/20/22(X86/ARM) Huawei Cloud EulerOS 2.0 标准版(64位)
  • 背景信息 租户在首次购买和开通智能终端安全服务后,或企业内部新增大量终端资产的情况下,需要批量安装HiSec Endpoint Agent。如果都采用本地安装,HiSec Endpoint Agent安装效率低,严重影响企业业务的正常运行。为了满足批量安装场景,提高运营效率,智能终端安全服务提供HiSec Endpoint Agent批量安装功能,租户管理员可通过邮件发送或域控的方式将HiSec Endpoint Agent部署在每一台待管理终端上。
  • URI POST /api/v1/namespaces/{namespace}/endpoints 表1 路径参数 参数 是否必选 参数类型 描述 namespace 是 String object name and auth scope, such as for teams and projects 表2 Query参数 参数 是否必选 参数类型 描述 dryRun 否 String When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed fieldManager 否 String fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. pretty 否 String If 'true', then the output is pretty printed.
  • 请求示例 创建Endpoint,端口名称为"service0",端口号"80",端口的IP协议为默认的TCP协议。 { "apiVersion" : "v1", "kind" : "Endpoints", "metadata" : { "name" : "test-endpoint", "namespace" : "test-namespace" }, "subsets" : [ { "addresses" : [ { "ip" : "192.168.226.222", "targetRef" : { "kind" : "Pod", "name" : "nginx-686bccd6f-ccsqb", "namespace" : "test-namespace", "resourceVersion" : "262055491", "uid" : "ae417968-4f69-40da-9228-2434671e9c66" } } ], "ports" : [ { "name" : "service0", "port" : 80, "protocol" : "TCP" } ] } ] }
  • 状态码 状态码 描述 200 OK 201 Created 202 Accepted 400 BadRequest 401 Unauthorized 403 Forbidden 404 NotFound 405 MethodNotAllowed 406 NotAcceptable 409 AlreadyExists 415 UnsupportedMediaType 422 Invalid 429 TooManyRequests 500 InternalError 503 ServiceUnavailable 504 ServerTimeout
  • 响应示例 状态码: 200 OK { "apiVersion" : "v1", "kind" : "Endpoints", "metadata" : { "creationTimestamp" : "2023-03-28T13:55:52Z", "name" : "test-endpoint", "namespace" : "test-namespace", "resourceVersion" : "263538673", "selfLink" : "/api/v1/namespaces/test-namespace/endpoints/test-endpoint", "uid" : "3907aa64-c3f3-4de0-b938-9d23e8d12f94" }, "subsets" : [ { "addresses" : [ { "ip" : "192.168.226.222", "targetRef" : { "kind" : "Pod", "name" : "nginx-686bccd6f-ccsqb", "namespace" : "test-namespace", "resourceVersion" : "262055491", "uid" : "ae417968-4f69-40da-9228-2434671e9c66" } } ], "ports" : [ { "name" : "service0", "port" : 80, "protocol" : "TCP" } ] } ] }
  • URI GET /api/v1/namespaces/{namespace}/endpoints/{name} 表1 路径参数 参数 是否必选 参数类型 描述 name 是 String name of the Endpoints namespace 是 String object name and auth scope, such as for teams and projects 表2 Query参数 参数 是否必选 参数类型 描述 exact 否 Boolean Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. export 否 Boolean Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. pretty 否 String If 'true', then the output is pretty printed.
  • 响应示例 状态码: 200 OK { "apiVersion" : "v1", "kind" : "Endpoints", "metadata" : { "creationTimestamp" : "2016-08-03T09:56:10Z", "name" : "cluster-test", "namespace" : "default", "resourceVersion" : "18186", "selfLink" : "/api/v1/namespaces/default/endpoints/cluster-test", "uid" : "81b1503d-5960-11e6-b444-286ed488fafe" }, "subsets" : [ { "addresses" : [ { "ip" : "172.16.106.152" }, { "ip" : "172.16.79.157" } ], "ports" : [ { "port" : 1, "protocol" : "TCP" } ] } ] }
  • 状态码 状态码 描述 200 OK 400 BadRequest 401 Unauthorized 403 Forbidden 404 NotFound 405 MethodNotAllowed 406 NotAcceptable 409 Conflict 415 UnsupportedMediaType 422 Invalid 429 TooManyRequests 500 InternalError 503 ServiceUnavailable 504 ServerTimeout
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。 通过调用 IAM 服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 enabled 否 String 设备是否可用,值为true或false字符串。 user_data 否 String 用户自定义数据,最大长度支持UTF-8编码后2048字节。
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 request_id String 请求的唯一标识ID。 状态码: 400 表5 响应Body参数 参数 参数类型 描述 request_id String 请求的唯一标识ID。 code String 服务异常错误信息编码。 message String 服务异常错误信息描述。 状态码: 403 表6 响应Body参数 参数 参数类型 描述 request_id String 请求的唯一标识ID。 code String 服务异常错误信息编码。 message String 服务异常错误信息描述。 状态码: 404 表7 响应Body参数 参数 参数类型 描述 request_id String 请求的唯一标识ID。 code String 服务异常错误信息编码。 message String 服务异常错误信息描述。 状态码: 500 表8 响应Body参数 参数 参数类型 描述 request_id String 请求的唯一标识ID。 code String 服务异常错误信息编码。 message String 服务异常错误信息描述。
  • 请求示例 更新Application endpoint POST https://{ SMN _Endpoint}/v2/{project_id}/notifications/applications/{application_urn}/endpoints{ "enabled" : "false", "user_data" : "This is an APNS token for user001"}
  • URI PUT /v2/{project_id}/notifications/endpoints/{endpoint_urn} 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID。 获取项目ID请参考 获取项目ID。 endpoint_urn 是 String Endpoint的唯一资源标识,可通过查询Application的Endpoint列表获取该标识。