{"base_path":"/","components":null,"consumes":"","definitions":{"CreateSecurityReportSubscriptionRequestBody":{"example":{"console_url_prefix":"https://console.huaweicloud.com/console/","report_category":"daily_report","report_content_subscription":{"attack_type_distribution_enable":true,"bandwidth_statistics_enable":true,"group_by_day_enable":true,"overview_statistics_enable":true,"qps_statistics_enable":false,"request_statistics_enable":true,"response_code_statistics_enable":true,"top_attack_source_ips_enable":false,"top_attack_source_locations_enable":true,"top_attacked_domains_enable":true,"top_attacked_urls_enable":true,"top_error_pages_enable":false},"report_name":"安全日报-华北4区-业务A","sending_period":"morning","stat_period":{"begin_time":1735689600000,"end_time":1735776000000},"subscription_type":"silent","topic_urn":"urn:smn:cn-north-4:0456cf04d6f64725ab02ed5bd2efdfa4:test-security-report"},"properties":{"console_url_prefix":{"description":"**参数解释:**\n控制台URL前缀,用于拼接生成报告中相关资源的控制台访问链接\n**格式要求:**\n必须以http://或https://开头的有效URL格式\n**约束限制:**\n仅支持华为云控制台域名及路径\n**默认取值:**\nhttps://console.huaweicloud.com/console/","example":"https://console.huaweicloud.com/console/","type":"string"},"report_category":{"description":"**参数解释:**\n报告类别,设置订阅的报告类型(如daily_report表示安全日报)。\n**约束限制:**\n不涉及\n**取值范围:**\n- daily_report : 日报\n- weekly_report : 周报\n- monthly_report : 月报\n- custom_report : 自定义\n\n**默认取值:**\n不涉及","example":"daily_report","type":"string"},"report_content_subscription":{"description":"**参数解释:**\n报告内容订阅,配置订阅报告包含的具体统计模块启用状态。\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","properties":{"attack_type_distribution_enable":{"description":"**参数解释:**\n是否启用攻击类型分布统计(true表示启用,false表示禁用)。\n**约束限制:**\n不涉及\n**取值范围:**\n仅支持true、false两个布尔值\n**默认取值:**\ntrue","example":true,"type":"boolean"},"bandwidth_statistics_enable":{"description":"**参数解释:**\n是否启用带宽统计内容(true表示启用,false表示禁用)。\n**约束限制:**\n不涉及\n**取值范围:**\n仅支持true、false两个布尔值\n**默认取值:**\ntrue","example":true,"type":"boolean"},"group_by_day_enable":{"description":"**参数解释:**\n是否启用按天分组统计(true表示启用,false表示禁用)。\n**约束限制:**\n不涉及\n**取值范围:**\n仅支持true、false两个布尔值\n**默认取值:**\ntrue","example":true,"type":"boolean"},"overview_statistics_enable":{"description":"**参数解释:**\n是否启用总览统计内容(true表示启用,false表示禁用)。\n**约束限制:**\n不涉及\n**取值范围:**\n仅支持true、false两个布尔值\n**默认取值:**\ntrue","example":true,"type":"boolean"},"qps_statistics_enable":{"description":"**参数解释:**\n是否启用QPS统计内容(true表示启用,false表示禁用)。\n**约束限制:**\n不涉及\n**取值范围:**\n仅支持true、false两个布尔值\n**默认取值:**\ntrue","example":true,"type":"boolean"},"request_statistics_enable":{"description":"**参数解释:**\n是否启用请求次数统计内容(true表示启用,false表示禁用)。\n**约束限制:**\n不涉及\n**取值范围:**\n仅支持true、false两个布尔值\n**默认取值:**\ntrue","example":true,"type":"boolean"},"response_code_statistics_enable":{"description":"**参数解释:**\n是否启用响应码统计内容(true表示启用,false表示禁用)。\n**约束限制:**\n不涉及\n**取值范围:**\n仅支持true、false两个布尔值\n**默认取值:**\ntrue","example":true,"type":"boolean"},"top_attack_source_ips_enable":{"description":"**参数解释:**\n是否启用TOP攻击源IP统计(true表示启用,false表示禁用)。\n**约束限制:**\n不涉及\n**取值范围:**\n仅支持true、false两个布尔值\n**默认取值:**\ntrue","example":true,"type":"boolean"},"top_attack_source_locations_enable":{"description":"**参数解释:**\n是否启用TOP攻击源地理位置统计(true表示启用,false表示禁用)。\n**约束限制:**\n不涉及\n**取值范围:**\n仅支持true、false两个布尔值\n**默认取值:**\ntrue","example":true,"type":"boolean"},"top_attacked_domains_enable":{"description":"**参数解释:**\n是否启用TOP被攻击域名统计(true表示启用,false表示禁用)。\n**约束限制:**\n不涉及\n**取值范围:**\n仅支持true、false两个布尔值\n**默认取值:**\ntrue","example":true,"type":"boolean"},"top_attacked_urls_enable":{"description":"**参数解释:**\n是否启用TOP被攻击URL统计(true表示启用,false表示禁用)。\n**约束限制:**\n不涉及\n**取值范围:**\n仅支持true、false两个布尔值\n**默认取值:**\ntrue","example":true,"type":"boolean"},"top_error_pages_enable":{"description":"**参数解释:**\n是否启用TOP错误页面统计(true表示启用,false表示禁用)。\n**约束限制:**\n不涉及\n**取值范围:**\n仅支持true、false两个布尔值\n**默认取值:**\ntrue","example":true,"type":"boolean"}}},"report_name":{"description":"**参数解释:**\n报告名称,设置订阅报告的名称。\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","example":"string","type":"string"},"sending_period":{"description":"**参数解释:**\n发送时间段,设置报告的预设发送时间(如morning表示早晨时段)。\n**约束限制:**\n不涉及\n**取值范围:**\n- morning : 00:00~06:00\n- noon : 06:00~12:00\n- afternoon : 12:00~18:00\n- evening : 12:00~18:00\n\n**默认取值:**\n不涉及","example":"morning","type":"string"},"stat_period":{"description":"**参数解释:**\n统计周期,定义数据统计的时间范围区间\n**约束限制:**\nbegin_time 必须小于 end_time,且均为毫秒级时间戳\n**默认取值:**\n不涉及","properties":{"begin_time":{"description":"**参数解释:**\n开始时间,统计周期的起始时间点(毫秒级时间戳)\n**格式要求:**\n符合Unix时间戳规范,精确到毫秒\n**取值范围:**\n1970-01-01 00:00:00 UTC至今的时间戳","example":11111,"format":"int64","type":"integer"},"end_time":{"description":"**参数解释:**\n结束时间,统计周期的终止时间点(毫秒级时间戳)\n**格式要求:**\n符合Unix时间戳规范,精确到毫秒\n**取值范围:**\n大于begin_time且在1970-01-01 00:00:00 UTC至今的时间戳","example":222222,"format":"int64","type":"integer"}}},"subscription_type":{"description":"**参数解释:**\n订阅类型,接收安全报告的订阅方式(如slient表示静默订阅)。\n**约束限制:**\n不涉及\n**取值范围:**\n- smn_topic : 消息主题\n- silent : 静默\n- message_center : 消息中心\n\n**默认取值:**\n不涉及","example":"silent","type":"string"},"topic_urn":{"description":"**参数解释:**\n主题urn,设置报告发送的SMN主题唯一标识。报告接收方式使用消息主题类型时需要填该参数。\n查询可使用的主题,通过 云日志服务的“查询SMN主题”接口,返回体中的\"topic_urn\"字段\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","example":"urn:smn:cn-north-4:0456cf04d6f64725ab02ed5bd2efdfa4:test","type":"string"}},"type":"object"},"IAM5ErrorDetails":{"description":"调用下游服务的报错信息集合,IAM5鉴权错误时才会返回此信息0。","properties":{"error_code":{"description":"下游服务错误码","type":"string"},"error_msg":{"description":"下游服务报错信息","type":"string"}}},"RestErrorResponse":{"properties":{"details":{"description":"调用下游服务的报错信息集合,IAM5鉴权错误时才会返回此字段。","items":{"$ref":"#/definitions/IAM5ErrorDetails"},"type":"array"},"encoded_authorization_message":{"description":"编码 (加密) 后的详细拒绝原因,用户可以自行调用 STS 服务的decode-authorization-message接口进行解码,可参考STS5联调自验证。IAM5鉴权错误时才会返回此字段。","type":"string"},"error_code":{"description":"错误码","type":"string"},"error_msg":{"description":"错误信息","type":"string"}},"title":"RestErrorResponse","type":"object"},"SecurityReportSubscriptionResponse":{"example":{"enterprise_project_id":"0","is_all_enterprise_project":false,"report_category":"daily_report","report_content_subscription":{"attack_type_distribution_enable":true,"bandwidth_statistics_enable":true,"group_by_day_enable":true,"overview_statistics_enable":true,"qps_statistics_enable":true,"request_statistics_enable":true,"response_code_statistics_enable":true,"top_attack_source_ips_enable":true,"top_attack_source_locations_enable":true,"top_attacked_domains_enable":true,"top_attacked_urls_enable":true,"top_error_pages_enable":true},"report_name":"test_1c086c","sending_period":"morning","subscription_id":"ae8ee8e1bd9c4ec88dc02c5e8a72c9b7","subscription_type":"silent","template_eps_id":"0"},"properties":{"enterprise_project_id":{"description":"**参数解释:**\n企业项目ID,订阅关联的企业项目唯一标识(is_all_enterprise_project为false时生效)。\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","example":3333,"type":"string"},"is_all_enterprise_project":{"description":"**参数解释:**\n是否是所有企业项目,标识订阅是否适用于当前租户的所有企业项目(true表示适用,false表示仅适用指定项目)。\n**约束限制:**\n不涉及\n**取值范围:**\n仅支持true、false两个布尔值\n**默认取值:**\nfalse","example":false,"type":"boolean"},"report_category":{"description":"**参数解释:**\n报告类别,设置订阅的报告类型(如daily_report表示安全日报)。\n**约束限制:**\n不涉及\n**取值范围:**\n- daily_report : 日报\n- weekly_report : 周报\n- monthly_report : 月报\n- custom_report : 自定义\n\n**默认取值:**\n不涉及","example":"daily_report","type":"string"},"report_content_subscription":{"description":"**参数解释:**\n报告内容订阅,配置订阅报告包含的具体统计模块启用状态。\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","properties":{"attack_type_distribution_enable":{"description":"**参数解释:**\n是否启用攻击类型分布统计(true表示启用,false表示禁用)。\n**约束限制:**\n不涉及\n**取值范围:**\n仅支持true、false两个布尔值\n**默认取值:**\ntrue","example":true,"type":"boolean"},"bandwidth_statistics_enable":{"description":"**参数解释:**\n是否启用带宽统计内容(true表示启用,false表示禁用)。\n**约束限制:**\n不涉及\n**取值范围:**\n仅支持true、false两个布尔值\n**默认取值:**\ntrue","example":true,"type":"boolean"},"group_by_day_enable":{"description":"**参数解释:**\n是否启用按天分组统计(true表示启用,false表示禁用)。\n**约束限制:**\n不涉及\n**取值范围:**\n仅支持true、false两个布尔值\n**默认取值:**\ntrue","example":true,"type":"boolean"},"overview_statistics_enable":{"description":"**参数解释:**\n是否启用总览统计内容(true表示启用,false表示禁用)。\n**约束限制:**\n不涉及\n**取值范围:**\n仅支持true、false两个布尔值\n**默认取值:**\ntrue","example":true,"type":"boolean"},"qps_statistics_enable":{"description":"**参数解释:**\n是否启用QPS统计内容(true表示启用,false表示禁用)。\n**约束限制:**\n不涉及\n**取值范围:**\n仅支持true、false两个布尔值\n**默认取值:**\ntrue","example":true,"type":"boolean"},"request_statistics_enable":{"description":"**参数解释:**\n是否启用请求次数统计内容(true表示启用,false表示禁用)。\n**约束限制:**\n不涉及\n**取值范围:**\n仅支持true、false两个布尔值\n**默认取值:**\ntrue","example":true,"type":"boolean"},"response_code_statistics_enable":{"description":"**参数解释:**\n是否启用响应码统计内容(true表示启用,false表示禁用)。\n**约束限制:**\n不涉及\n**取值范围:**\n仅支持true、false两个布尔值\n**默认取值:**\ntrue","example":true,"type":"boolean"},"top_abnormal_urls_enable":{"description":"**参数解释:**\n是否启用TOP异常URL统计(true表示启用,false表示禁用)。\n**约束限制:**\n不涉及\n**取值范围:**\n仅支持true、false两个布尔值\n**默认取值:**\ntrue","example":true,"type":"boolean"},"top_attack_source_ips_enable":{"description":"**参数解释:**\n是否启用TOP攻击源IP统计(true表示启用,false表示禁用)。\n**约束限制:**\n不涉及\n**取值范围:**\n仅支持true、false两个布尔值\n**默认取值:**\ntrue","example":true,"type":"boolean"},"top_attack_source_locations_enable":{"description":"**参数解释:**\n是否启用TOP攻击源地理位置统计(true表示启用,false表示禁用)。\n**约束限制:**\n不涉及\n**取值范围:**\n仅支持true、false两个布尔值\n**默认取值:**\ntrue","example":true,"type":"boolean"},"top_attacked_domains_enable":{"description":"**参数解释:**\n是否启用TOP被攻击域名统计(true表示启用,false表示禁用)。\n**约束限制:**\n不涉及\n**取值范围:**\n仅支持true、false两个布尔值\n**默认取值:**\ntrue","example":true,"type":"boolean"},"top_attacked_urls_enable":{"description":"**参数解释:**\n是否启用TOP被攻击URL统计(true表示启用,false表示禁用)。\n**约束限制:**\n不涉及\n**取值范围:**\n仅支持true、false两个布尔值\n**默认取值:**\ntrue","example":true,"type":"boolean"}}},"report_name":{"description":"**参数解释:**\n报告名称,当前安全报告订阅的报告名称。\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","example":"安全日报-华北4区-业务A","type":"string"},"sending_period":{"description":"**参数解释:**\n发送时间段,标识报告的预设发送时间(如morning表示早晨时段)。\n**约束限制:**\n不涉及\n**取值范围:**\n- morning : 00:00~06:00\n- noon : 06:00~12:00\n- afternoon : 12:00~18:00\n- evening : 12:00~18:00\n\n**默认取值:**\n不涉及","example":"morning","type":"string"},"stat_period":{"description":"**参数解释:**\n统计周期,订阅报告的默认统计时间范围配置。\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","properties":{"begin_time":{"description":"**参数解释:**\n开始时间,订阅报告统计周期的起始时间戳(毫秒级)。\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","example":11111,"format":"int64","type":"integer"},"end_time":{"description":"**参数解释:**\n结束时间,订阅报告统计周期的终止时间戳(毫秒级)。\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","example":222222,"format":"int64","type":"integer"}}},"subscription_id":{"description":"**参数解释:**\n订阅ID,唯一标识当前安全报告订阅。\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","example":111111,"type":"string"},"subscription_type":{"description":"**参数解释:**\n订阅类型,接收安全报告的订阅方式(如slient表示静默订阅)。\n**约束限制:**\n不涉及\n**取值范围:**\n- smn_topic : 消息主题\n- silent : 静默\n- message_center : 消息中心\n\n**默认取值:**\n不涉及","example":"slient","type":"string"},"topic_urn":{"description":"**参数解释:**\n报告接收方式使用消息主题类型时需要填该参数。\n查询可使用的主题,通过 云日志服务的“查询SMN主题”接口,返回体中的\"topic_urn\"字段\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","example":"topic_example","type":"string"}},"type":"object"}},"description":null,"group_id":"29975c0bd7ce463ca70ad5c074e3974b","host":"waf.cn-north-4.myhuaweicloud.com","id":"836d5ec7520a4250984f36394b41b8fc","info_version":"v1","method":"post","name":"CreateSecurityReportSubscription","parameters":{},"paths":{"/v1/{project_id}/waf/security-report/subscriptions":{"post":{"description":"创建安全报告订阅","operationId":"CreateSecurityReportSubscription","parameters":[{"description":"租户token","in":"header","maxLength":4096,"minLength":32,"name":"X-Auth-Token","required":true,"type":"string"},{"default":"application/json;charset=utf8","description":"content-type","in":"header","name":"Content-Type","required":true,"type":"string"},{"description":"**参数解释:**\n项目ID,对应控制台用户名->我的凭证->项目列表->项目ID。\n**约束限制:**\n不涉及\n**取值范围:**\n只能由英文字母、数字组成,且长度为32个字符。\n**默认取值:**\n不涉及","in":"path","name":"project_id","required":true,"type":"string"},{"description":"创建安全报告订阅","in":"body","name":"CreateSecurityReportSubscriptionRequest","required":true,"schema":{"$ref":"#/definitions/CreateSecurityReportSubscriptionRequestBody"}}],"produces":["application/json"],"responses":{"200":{"description":"安全报告订阅响应","examples":{"application/json":{"enterprise_project_id":"0","is_all_enterprise_project":false,"report_category":"daily_report","report_content_subscription":{"attack_type_distribution_enable":true,"bandwidth_statistics_enable":true,"group_by_day_enable":true,"overview_statistics_enable":true,"qps_statistics_enable":true,"request_statistics_enable":true,"response_code_statistics_enable":true,"top_attack_source_ips_enable":true,"top_attack_source_locations_enable":true,"top_attacked_domains_enable":true,"top_attacked_urls_enable":true},"report_name":"test_1c086c","sending_period":"morning","subscription_id":"ae8ee8e1bd9c4ec88dc02c5e8a72c9b7","subscription_type":"silent"}},"schema":{"$ref":"#/definitions/SecurityReportSubscriptionResponse"}},"400":{"description":"请求失败","schema":{"$ref":"#/definitions/RestErrorResponse"}},"401":{"description":"token权限不足","schema":{"$ref":"#/definitions/RestErrorResponse"}},"500":{"description":"服务器内部错误","schema":{"$ref":"#/definitions/RestErrorResponse"}}},"summary":"创建安全报告订阅","tags":["安全报告管理"],"x-api-type":"open-api","x-is-registered":"Y","x-support-sdk":"Y"}}},"product_short":"WAF","region_id":"cn-north-4","schemes":["HTTPS"],"security_definitions":null,"summary":"创建安全报告订阅","tags":"安全报告管理","uri":null,"version":"2.0"}