华为云用户手册

  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 最小长度:32 最大长度:2097152 Content-Type 是 String Content-Type 缺省值:application/json;charset=utf8 最小长度:1 最大长度:128 表3 请求Body参数 参数 是否必选 参数类型 描述 instance_id 是 String 实例id type 是 String 规则类型。black - 黑名单, white - 白名单 ips 是 Array of strings ip列表
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 total_unblocking_times Integer 总解封次数 最小值:0 最大值:2097152 manual_unblocking_times Integer 人工解封次数 最小值:0 最大值:2097152 automatic_unblocking_times Integer 自动解封次数 最小值:0 最大值:2097152 current_blocked_ip_numbers Integer 当前封堵Ip数 最小值:0 最大值:2097152
  • Go 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 package main import ( "fmt" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" antiddos "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/antiddos/v1" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/antiddos/v1/model" region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/antiddos/v1/region" ) func main() { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security. // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment ak := os.Getenv("CLOUD_SDK_AK") sk := os.Getenv("CLOUD_SDK_SK") auth := basic.NewCredentialsBuilder(). WithAk(ak). WithSk(sk). Build() client := antiddos.NewAntiDDoSClient( antiddos.AntiDDoSClientBuilder(). WithRegion(region.ValueOf("cn-north-4")). WithCredential(auth). Build()) request := &model.DeleteDefaultConfigRequest{} response, err := client.DeleteDefaultConfig(request) if err == nil { fmt.Printf("%+v\n", response) } else { fmt.Println(err) } }
  • Java 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 package com.huaweicloud.sdk.test; import com.huaweicloud.sdk.core.auth.ICredential; import com.huaweicloud.sdk.core.auth.BasicCredentials; import com.huaweicloud.sdk.core.exception.ConnectionException; import com.huaweicloud.sdk.core.exception.RequestTimeoutException; import com.huaweicloud.sdk.core.exception.ServiceResponseException; import com.huaweicloud.sdk.antiddos.v1.region.AntiDDoSRegion; import com.huaweicloud.sdk.antiddos.v1.*; import com.huaweicloud.sdk.antiddos.v1.model.*; public class DeleteDefaultConfigSolution { public static void main(String[] args) { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security. // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment String ak = System.getenv("CLOUD_SDK_AK"); String sk = System.getenv("CLOUD_SDK_SK"); ICredential auth = new BasicCredentials() .withAk(ak) .withSk(sk); AntiDDoSClient client = AntiDDoSClient.newBuilder() .withCredential(auth) .withRegion(AntiDDoSRegion.valueOf("cn-north-4")) .build(); DeleteDefaultConfigRequest request = new DeleteDefaultConfigRequest(); try { DeleteDefaultConfigResponse response = client.deleteDefaultConfig(request); System.out.println(response.toString()); } catch (ConnectionException e) { e.printStackTrace(); } catch (RequestTimeoutException e) { e.printStackTrace(); } catch (ServiceResponseException e) { e.printStackTrace(); System.out.println(e.getHttpStatusCode()); System.out.println(e.getRequestId()); System.out.println(e.getErrorCode()); System.out.println(e.getErrorMsg()); } } }
  • Python 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 # coding: utf-8 from huaweicloudsdkcore.auth.credentials import BasicCredentials from huaweicloudsdkantiddos.v1.region.antiddos_region import AntiDDoSRegion from huaweicloudsdkcore.exceptions import exceptions from huaweicloudsdkantiddos.v1 import * if __name__ == "__main__": # The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security. # In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment ak = os.getenv("CLOUD_SDK_AK") sk = os.getenv("CLOUD_SDK_SK") credentials = BasicCredentials(ak, sk) \ client = AntiDDoSClient.new_builder() \ .with_credentials(credentials) \ .with_region(AntiDDoSRegion.value_of("cn-north-4")) \ .build() try: request = DeleteDefaultConfigRequest() response = client.delete_default_config(request) print(response) except exceptions.ClientRequestException as e: print(e.status_code) print(e.request_id) print(e.error_code) print(e.error_msg)
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 最小长度:32 最大长度:2097152 Content-Type 是 String Content-Type请求头 缺省值:application/json;charset=utf8 最小长度:1 最大长度:255
  • 请求示例 为ID为634f346e-a291-4124-a6be-ac57e6152463的防护包下指定防护策略绑定防护ID为“634f346e-a291-4124-a6be-ac57e6152464”的IP。 POST https://{endpoint}/v1/cnad/policies/{policy_id}/bind { "package_id" : "634f346e-a291-4124-a6be-ac57e6152463", "id_list" : [ "634f346e-a291-4124-a6be-ac57e6152464" ] }
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 最小长度:32 最大长度:2097152 Content-Type 是 String Content-Type 缺省值:application/json;charset=utf8 最小长度:1 最大长度:255 表3 请求Body参数 参数 是否必选 参数类型 描述 package_id 是 String 防护包id 最小长度:32 最大长度:64 id_list 是 Array of strings 防护ip的id列表 最小长度:7 最大长度:128 数组长度:0 - 2147483647
  • Go 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 package main import ( "fmt" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" antiddos "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/antiddos/v1" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/antiddos/v1/model" region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/antiddos/v1/region" ) func main() { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security. // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment ak := os.Getenv("CLOUD_SDK_AK") sk := os.Getenv("CLOUD_SDK_SK") auth := basic.NewCredentialsBuilder(). WithAk(ak). WithSk(sk). Build() client := antiddos.NewAntiDDoSClient( antiddos.AntiDDoSClientBuilder(). WithRegion(region.ValueOf("cn-north-4")). WithCredential(auth). Build()) request := &model.ShowDefaultConfigRequest{} response, err := client.ShowDefaultConfig(request) if err == nil { fmt.Printf("%+v\n", response) } else { fmt.Println(err) } }
  • Python 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 # coding: utf-8 from huaweicloudsdkcore.auth.credentials import BasicCredentials from huaweicloudsdkantiddos.v1.region.antiddos_region import AntiDDoSRegion from huaweicloudsdkcore.exceptions import exceptions from huaweicloudsdkantiddos.v1 import * if __name__ == "__main__": # The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security. # In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment ak = os.getenv("CLOUD_SDK_AK") sk = os.getenv("CLOUD_SDK_SK") credentials = BasicCredentials(ak, sk) \ client = AntiDDoSClient.new_builder() \ .with_credentials(credentials) \ .with_region(AntiDDoSRegion.value_of("cn-north-4")) \ .build() try: request = ShowDefaultConfigRequest() response = client.show_default_config(request) print(response) except exceptions.ClientRequestException as e: print(e.status_code) print(e.request_id) print(e.error_code) print(e.error_msg)
  • Java 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 package com.huaweicloud.sdk.test; import com.huaweicloud.sdk.core.auth.ICredential; import com.huaweicloud.sdk.core.auth.BasicCredentials; import com.huaweicloud.sdk.core.exception.ConnectionException; import com.huaweicloud.sdk.core.exception.RequestTimeoutException; import com.huaweicloud.sdk.core.exception.ServiceResponseException; import com.huaweicloud.sdk.antiddos.v1.region.AntiDDoSRegion; import com.huaweicloud.sdk.antiddos.v1.*; import com.huaweicloud.sdk.antiddos.v1.model.*; public class ShowDefaultConfigSolution { public static void main(String[] args) { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security. // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment String ak = System.getenv("CLOUD_SDK_AK"); String sk = System.getenv("CLOUD_SDK_SK"); ICredential auth = new BasicCredentials() .withAk(ak) .withSk(sk); AntiDDoSClient client = AntiDDoSClient.newBuilder() .withCredential(auth) .withRegion(AntiDDoSRegion.valueOf("cn-north-4")) .build(); ShowDefaultConfigRequest request = new ShowDefaultConfigRequest(); try { ShowDefaultConfigResponse response = client.showDefaultConfig(request); System.out.println(response.toString()); } catch (ConnectionException e) { e.printStackTrace(); } catch (RequestTimeoutException e) { e.printStackTrace(); } catch (ServiceResponseException e) { e.printStackTrace(); System.out.println(e.getHttpStatusCode()); System.out.println(e.getRequestId()); System.out.println(e.getErrorCode()); System.out.println(e.getErrorMsg()); } } }
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 enable_L7 Boolean 是否开启L7层防护,固定值为fasle traffic_pos_id Long 流量分段ID,取值范围:1~9、88、99 最小值:1 最大值:99 http_request_pos_id Long HTTP请求数分段ID,取值范围:1~15 最小值:1 最大值:15 cleaning_access_pos_id Long 清洗时访问限制分段ID,取值范围:1~8、88、99 最小值:1 最大值:99 app_type_id Integer 应用类型ID,可选取值: 0 1
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 最小长度:32 最大长度:2097152 Content-Type 是 String Content-Type请求头 缺省值:application/json;charset=utf8 最小长度:1 最大长度:255
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 最小长度:32 最大长度:2097152 Content-Type 是 String Content-Type 缺省值:application/json;charset=utf8 最小长度:1 最大长度:128 表3 请求Body参数 参数 是否必选 参数类型 描述 op_type 是 Integer 操作类型。0 - 上传, 1 - 更换 cert_name 是 String 证书名称 cert_file 否 String 证书文件。上传新证书(op_type为0)时必填,更换为已有证书(op_type为1)时置空 cert_key_file 否 String 私钥文件。上传新证书(op_type为0)时必填,更换为已有证书(op_type为1)时置空 domain_id 是 String 域名id
  • 操作步骤 查询默认防护策略。 接口相关信息 URI格式:GET /v1/{project_id}/antiddos/default-config 详情请参见“查询Anti-DDoS默认防护策略”。 请求示例 GET: https://{endpoint}/v1/1858a4e1f99d4454bd6a539d5477f5de/antiddos/default/config {endpoint}信息请从地区和终端节点获取。 Body: { } 响应示例 { "app_type_id": 1, "cleaning_access_pos_id": 8, "enable_L7": false, "http_request_pos_id": 8, "traffic_pos_id": 8 } 配置默认防护策略。 接口相关信息 URI格式:POST /v1/{project_id}/antiddos/default-config 详情请参见“配置Anti-DDoS默认防护策略”。 请求示例 POST: https://{endpoint}/v1/1858a4e1f99d4454bd6a539d5477f5de/antiddos/default-config {endpoint}信息请从地区和终端节点获取。 Body: { "app_type_id": 1, "cleaning_access_pos_id": 8, "enable_L7": false, "http_request_pos_id": 8, "traffic_pos_id": 8 } 响应示例 { }
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 最小长度:32 最大长度:2097152 Content-Type 是 String Content-Type 缺省值:application/json;charset=utf8 最小长度:1 最大长度:255 表3 请求Body参数 参数 是否必选 参数类型 描述 protected_ip_list 是 Array of UpdateProtectedIpInPolicyBody objects 全量防护ip列表 数组长度:0 - 2147483647 表4 UpdateProtectedIpInPolicyBody 参数 是否必选 参数类型 描述 id 是 String 防护ip的id 最小长度:32 最大长度:64 ip 是 String 防护ip 最小长度:7 最大长度:128 type 是 String 类型。VPN:VPN;NAT:NAT;VIP:VIP;CCI:CCI;EIP:弹性公网IP;ELB:弹性负载均衡;REROUTING_IP:REROUTING_IP;SubEni:SubEni;NetInterFace:NetInterFace; name 否 String 名字 最小长度:1 最大长度:255
  • 请求示例 将指定防护包的全量防护对象更改为EIP“1.1.1.1”(ID标识为“0c613ff9-2b63-4aa2-9333-e03541fe0d9a”)。 POST https://{endpoint}/v1/cnad/packages/{package_id}/protected-ips { "protected_ip_list" : [ { "ip" : "1.1.1.1", "id" : "0c613ff9-2b63-4aa2-9333-e03541fe0d9a", "type" : "EIP" } ] }
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 最小长度:32 最大长度:2097152 Content-Type 是 String Content-Type 缺省值:application/json;charset=utf8 最小长度:1 最大长度:255 表3 请求Body参数 参数 是否必选 参数类型 描述 name 否 String 策略名 最小长度:1 最大长度:255 threshold 否 Integer 清洗阈值 最小值:100 最大值:1000 description 否 String 描述 最小长度:0 最大长度:255 udp 否 String udp协议封禁。block:封禁,unblock:不封禁
  • Python 设置消息通知的主题为“urn:smn:cn-north-7:2d2d90a56a3243bdb909f6a24a27be8d:cnad-test-intl”,并配置需要告警通知的攻击类型为DDoS攻击 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 # coding: utf-8 from huaweicloudsdkcore.auth.credentials import BasicCredentials from huaweicloudsdkantiddos.v1.region.antiddos_region import AntiDDoSRegion from huaweicloudsdkcore.exceptions import exceptions from huaweicloudsdkantiddos.v1 import * if __name__ == "__main__": # The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security. # In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment ak = os.getenv("CLOUD_SDK_AK") sk = os.getenv("CLOUD_SDK_SK") credentials = BasicCredentials(ak, sk) \ client = AntiDDoSClient.new_builder() \ .with_credentials(credentials) \ .with_region(AntiDDoSRegion.value_of("cn-north-4")) \ .build() try: request = UpdateAlertConfigRequest() warnConfigbody = UpdateAlertConfigRequestBodyWarnConfig( anti_d_do_s=True, back_doors=False, bruce_force=False, high_privilege=False, remote_login=False, send_frequency=1, waf=False, weak_password=False ) request.body = UpdateAlertConfigRequestBody( warn_config=warnConfigbody, topic_urn="urn:smn:cn-north-7:2d2d90a56a3243bdb909f6a24a27be8d:cnad-test-intl", display_name="" ) response = client.update_alert_config(request) print(response) except exceptions.ClientRequestException as e: print(e.status_code) print(e.request_id) print(e.error_code) print(e.error_msg)
  • Go 设置消息通知的主题为“urn:smn:cn-north-7:2d2d90a56a3243bdb909f6a24a27be8d:cnad-test-intl”,并配置需要告警通知的攻击类型为DDoS攻击 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 package main import ( "fmt" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" antiddos "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/antiddos/v1" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/antiddos/v1/model" region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/antiddos/v1/region" ) func main() { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security. // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment ak := os.Getenv("CLOUD_SDK_AK") sk := os.Getenv("CLOUD_SDK_SK") auth := basic.NewCredentialsBuilder(). WithAk(ak). WithSk(sk). Build() client := antiddos.NewAntiDDoSClient( antiddos.AntiDDoSClientBuilder(). WithRegion(region.ValueOf("cn-north-4")). WithCredential(auth). Build()) request := &model.UpdateAlertConfigRequest{} backDoorsWarnConfig:= false bruceForceWarnConfig:= false highPrivilegeWarnConfig:= false remoteLoginWarnConfig:= false sendFrequencyWarnConfig:= int32(1) wafWarnConfig:= false weakPasswordWarnConfig:= false warnConfigbody := &model.UpdateAlertConfigRequestBodyWarnConfig{ AntiDDoS: true, BackDoors: &backDoorsWarnConfig, BruceForce: &bruceForceWarnConfig, HighPrivilege: &highPrivilegeWarnConfig, RemoteLogin: &remoteLoginWarnConfig, SendFrequency: &sendFrequencyWarnConfig, Waf: &wafWarnConfig, WeakPassword: &weakPasswordWarnConfig, } request.Body = &model.UpdateAlertConfigRequestBody{ WarnConfig: warnConfigbody, TopicUrn: "urn:smn:cn-north-7:2d2d90a56a3243bdb909f6a24a27be8d:cnad-test-intl", DisplayName: "", } response, err := client.UpdateAlertConfig(request) if err == nil { fmt.Printf("%+v\n", response) } else { fmt.Println(err) } }
  • 请求示例 设置消息通知的主题为“urn:smn:cn-north-7:2d2d90a56a3243bdb909f6a24a27be8d:cnad-test-intl”,并配置需要告警通知的攻击类型为DDoS攻击 POST https://{endpoint}/v2/{project_id}/warnalert/alertconfig/update { "display_name" : "", "topic_urn" : "urn:smn:cn-north-7:2d2d90a56a3243bdb909f6a24a27be8d:cnad-test-intl", "warn_config" : { "antiDDoS" : true, "back_doors" : false, "bruce_force" : false, "high_privilege" : false, "remote_login" : false, "send_frequency" : 1, "waf" : false, "weak_password" : false } }
  • Java 设置消息通知的主题为“urn:smn:cn-north-7:2d2d90a56a3243bdb909f6a24a27be8d:cnad-test-intl”,并配置需要告警通知的攻击类型为DDoS攻击 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 package com.huaweicloud.sdk.test; import com.huaweicloud.sdk.core.auth.ICredential; import com.huaweicloud.sdk.core.auth.BasicCredentials; import com.huaweicloud.sdk.core.exception.ConnectionException; import com.huaweicloud.sdk.core.exception.RequestTimeoutException; import com.huaweicloud.sdk.core.exception.ServiceResponseException; import com.huaweicloud.sdk.antiddos.v1.region.AntiDDoSRegion; import com.huaweicloud.sdk.antiddos.v1.*; import com.huaweicloud.sdk.antiddos.v1.model.*; public class UpdateAlertConfigSolution { public static void main(String[] args) { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security. // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment String ak = System.getenv("CLOUD_SDK_AK"); String sk = System.getenv("CLOUD_SDK_SK"); ICredential auth = new BasicCredentials() .withAk(ak) .withSk(sk); AntiDDoSClient client = AntiDDoSClient.newBuilder() .withCredential(auth) .withRegion(AntiDDoSRegion.valueOf("cn-north-4")) .build(); UpdateAlertConfigRequest request = new UpdateAlertConfigRequest(); UpdateAlertConfigRequestBody body = new UpdateAlertConfigRequestBody(); UpdateAlertConfigRequestBodyWarnConfig warnConfigbody = new UpdateAlertConfigRequestBodyWarnConfig(); warnConfigbody.withAntiDDoS(true) .withBackDoors(false) .withBruceForce(false) .withHighPrivilege(false) .withRemoteLogin(false) .withSendFrequency(1) .withWaf(false) .withWeakPassword(false); body.withWarnConfig(warnConfigbody); body.withTopicUrn("urn:smn:cn-north-7:2d2d90a56a3243bdb909f6a24a27be8d:cnad-test-intl"); body.withDisplayName(""); request.withBody(body); try { UpdateAlertConfigResponse response = client.updateAlertConfig(request); System.out.println(response.toString()); } catch (ConnectionException e) { e.printStackTrace(); } catch (RequestTimeoutException e) { e.printStackTrace(); } catch (ServiceResponseException e) { e.printStackTrace(); System.out.println(e.getHttpStatusCode()); System.out.println(e.getRequestId()); System.out.println(e.getErrorCode()); System.out.println(e.getErrorMsg()); } } }
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 最小长度:32 最大长度:2097152 Content-Type 是 String Content-Type请求头 缺省值:application/json;charset=utf8 最小长度:1 最大长度:255 表3 请求Body参数 参数 是否必选 参数类型 描述 display_name 是 String 告警群组描述。 最小长度:1 最大长度:255 topic_urn 是 String 告警群组的唯一标识。 最小长度:1 最大长度:255 warn_config 是 WarnConfig object 告警配置信息。 表4 WarnConfig 参数 是否必选 参数类型 描述 antiDDoS 是 Boolean DDoS攻击 back_doors 否 Boolean 网页后门 bruce_force 否 Boolean 暴力破解(系统登录,FTP,DB) high_privilege 否 Boolean 数据库进程权限过高 remote_login 否 Boolean 异地登录提醒 send_frequency 否 Integer 取值范围: 0:表示每天一次 1:表示半小时一次 对于HID必选。 waf 否 Boolean 保留字段 weak_password 否 Boolean 弱口令(系统,数据库)
  • 服务集成 服务集成中创建并开放的API,支持如下请求协议:RESTful、SOAP、WebSocket。 服务集成的自定义后端支持的数据源相关信息如表2所示。 表2 自定义后端支持的数据源 数据源类型 支持的版本 DWS 1.3.4 Gauss100 FusionInsight_LibrA_V100R003C20、FusionInsight_LibrA_V300R001C00 HANA 1.0 HIVE 2.3.2 MongoDB 3.4 MySQL 5.7,8.0 MRS HBase MRS 3.*.* MRS Hive MRS 3.*.* Oracle 11.2g(不推荐)、12.1g(不推荐)、12.2g、19c PostgreSQL 11.0 Redis 3.0.7、4.0.11 SQL Server 2014、2019、2022
  • 数据集成 数据集成任务支持的数据源相关信息如表1所示。 表1 数据集成支持的数据源 数据源类型 支持的版本 普通任务的源端 普通任务的目标端 组合任务的源端 组合任务的目标端 API - 支持 支持 不支持 不支持 ActiveMQ 5.15.9 支持 支持 不支持 不支持 ArtemisMQ 2.9.0 支持 支持 不支持 不支持 DB2 9.7 支持 支持 不支持 不支持 DIS - 支持 支持 不支持 不支持 DWS 1.3.4 支持 支持 不支持 不支持 DM 无版本号 支持 支持 不支持 不支持 FTP - 支持 支持 不支持 不支持 Gauss100 FusionInsight_LibrA_V100R003C20、FusionInsight_LibrA_V300R001C00 支持 支持 不支持 不支持 GaussDB(for MySQL) 2.0.15.6 支持 支持 不支持 不支持 HL7 2.1、2.2、2.3、2.3.1、2.4、2.5、2.6、2.7、2.8、2.8.1 支持 支持 不支持 不支持 HANA 1.0 支持 支持 支持 支持 IBM MQ 9.1 支持 支持 不支持 不支持 Kafka 1.1.0、2.3.0 支持 支持 不支持 支持 LDAP - 支持 不支持 不支持 不支持 MongoDB 3.4 支持 支持 不支持 不支持 MQS 无版本号 支持 支持 不支持 不支持 MRS Hive MRS 3.*.* 支持 支持 不支持 不支持 MRS HDFS MRS 3.*.* 支持 支持 不支持 不支持 MRS HBase MRS 3.*.* 支持 支持 不支持 不支持 MRS Kafka MRS 3.*.* 支持 支持 不支持 不支持 MySQL 5.7、8.0 支持 支持 支持 支持 OBS 3 支持 支持 不支持 不支持 Oracle 11.2g(不推荐)、12.1g(不推荐)、12.2g、19c 支持 支持 支持 支持 PostgreSQL 11 支持 支持 支持 支持 RabbitMQ 3.6.10 支持 支持 不支持 不支持 RocketMQ 4.7.0 支持 支持 不支持 不支持 Redis 3.0.7、4.0.11 不支持 支持 不支持 不支持 SAP SAP Java Connector 3.0.19 支持 不支持 不支持 不支持 SNMP v1、v2、v3 支持 不支持 不支持 不支持 SQL Server 2014、2019、2022 支持 支持 支持 支持 WebSocket - 支持 不支持 不支持 不支持 自定义数据源 - 支持 支持 不支持 不支持
  • 前提条件 专业版和基础版边缘节点均支持远程维护功能。 节点状态为未安装/升级中/删除中时,无法使用远程登录功能。 远程主机安装了SSH服务端程序,并正常监听22端口,仅下载模块日志的话可以忽略这条。 节点已经部署$edge_omagent模块且运行正常。 输入的远程主机账号密码错误,则无法登录节点。 节点状态是离线时,可能会因无法正常建立通道,导致功能不可用。 只支持一个用户在线登录,新用户登录会造成老用户下线。 页签切换,会造成客户端通道关闭,需要重新登录。 当应用$edge_agent大于1-1-6版本时,不再支持远程SSH功能,如需使用,则需部署$edge_omagent应用1-1-11或以上版本。
  • 工作台 访问IoT边缘本地控制台,进入首页统一门户,如下图所示: 图1 统一门户 工作台主要包含以下五个模块: 监控总览:对数据库、操作系统、网络设备、容器、服务器和虚拟化等监控对象进行分类,分别展示各个监控对象的数量和告警级别,其中,告警级别包括紧急、严重、次要、警告和信息。 告警统计:以柱状图的形式展示一周内各监控对象的告警信息数量。 近一周告警:以折线图的形式展示一周内严重级别以上的告警数目变化,同时展示最新的告警信息详情。 对象未恢复告警数Top10:对于产生告警的监控对象,按照一周内未恢复告警数目从高到低展示10条内容。 触发器告警Top10:根据触发器告警的次数从高到低展示一周内的10条内容。 首次登录使用Admin账号,为保证安全,建议在用户管理中新建用户账号登录。 父主题: 统一门户
  • 本地运维管理 IoT边缘本地控制台为边缘集群提供本地运维能力,统一监控资源、告警与指标信息。 登录“IoT边缘本地控制台”,您可以: 管理员可对账号以及账号的权限进行管理和设置。 对应用的状态进行监控,以及管理。 在本地设置和查看各种业务指标,并设置告警阈值,支持告警的查看和管理。 支持边缘网关的发放,实现边缘就近接入与数据路由。 支持国产化软硬件部署,覆盖主流操作系统、数据库、中间件、服务器存储等资源指标监控。 贯穿IT监控、CMDB、自动化、ITSM、事件平台等领域,实现监控和资产、告警和流程、流程与资产等运维场景串联打通。 统一门户 监控运维中心 告警中心 应用管理 物联接入 系统配置
  • 解决方法 通过实名认证 未通过实名认证的账号,会在控制台顶部提示用户,根据指导完成实名认证即可。 也可单击右上角账号名的“基本信息”,进入“账号中心”,单击左边菜单栏“实名认证”,按照指导完成实名认证。 账号充值 单击控制台上方“费用中心”,查看现金余额是否小于0,单击“充值”,为您的账号进行余额充值。 账号解冻 单击右上角账号名的“基本信息”,进入“账号中心”,查看基本信息或控制台顶部是否提示账号已冻结。如果账号被冻结,请联系人工客服解冻账号。 授予IEF权限 创建用户组、用户并授予IEF权限,具体请参考创建用户并授权使用IEF。
  • docker daemon配置代理 在一些实验室环境,服务器没有直接连接外网的权限,需要通过网络代理。用户通常会将网络代理直接配置在/etc/environment、/etc/profile之类的配置文件中,这对于大部分操作都是可行的。然而,docker命令却使用不了这些代理。比如docker pull时需要从外网下载镜像,就会出现如下错误: $ docker pull hello-world Unable to find image 'hello-world:latest' locally Pulling repository docker.io/library/hello-world docker: Network timed out while trying to connect to https://index.docker.io/v1/repositories/library/hello-world/images. You may want to check your internet connection or if you are behind a proxy.. 解决方案一:停止docker服务,手动以使用2375端口监听所有网络接口的方式启动docker daemon。 systemctl stop docker.service nohup docker daemon -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock & 解决方案二:编辑配置文件,Ubuntu下是/etc/default/docker,CentOS下是/etc/sysconfig/docker。不过通过修改这两个文件来配置daemon已经是过时的了。不鼓励使用这种方法。 HTTP_PROXY="http://[proxy-addr]:[proxy-port]/" HTTPS_PROXY="https://[proxy-addr]:[proxy-port]/" export HTTP_PROXY HTTPS_PROXY 解决方案三:该方法是持久化的,修改后会一直生效。该方法覆盖了默认的docker.service文件。 为docker服务创建一个内嵌的systemd目录。 mkdir -p /etc/systemd/system/docker.service.d 创建/etc/systemd/system/docker.service.d/http-proxy.conf文件,并添加HTTP_PROXY环境变量。其中[proxy-addr]和[proxy-port]分别改成实际的代理地址和端口。 [Service] Environment="HTTP_PROXY=http://[proxy-addr]:[proxy-port]/" "HTTPS_PROXY=https://[proxy-addr]:[proxy-port]/" 如果还有内部的不需要使用代理来访问的Docker registries,那么需要设置NO_PROXY环境变量: [Service] Environment="HTTP_PROXY=http://[proxy-addr]:[proxy-port]/" "HTTPS_PROXY=https://[proxy-addr]:[proxy-port]/" "NO_PROXY=localhost,127.0.0.1,docker-registry.somecorporation.com" 更新配置。 systemctl daemon-reload 重启Docker服务。 systemctl restart docker
共100000条