华为云用户手册

  • 新闻播报风格英文文案(100句) China is the first country in the world with over three million valid domestic invention patents. China's number of valid invention patents has ranked first in the world. By the end of two thousand and twenty-two, the number of high-value invention patents reached one point three two four million. They accounted for over forty percent of the total valid invention patents. China is transitioning from a country that imports intellectual property rights to a country that creates intellectual property rights. The focus of intellectual property work is shifting from pursuing quantity to improving quality. Recently, the issue of chaotic fees for internet TV has been trending, attracting widespread attention. The nested membership and video-watching model of internet TV platforms has been strongly criticized by many netizens. With the strengthening of copyright protection awareness, users are willing to pay to watch film and television content. However, many businesses have neglected the viewing experience of consumers while charging fees. Video platforms should focus more on exploring their own content, rather than simply raising prices for users. All parties need to consider multiple factors and market needs that are compatible with multiple terminals. To achieve long-term success, we must bring more abundant resources to the people. Online violence is a major problem facing society today. On social media, people can freely express their opinions. However, we must also be aware of the consequences of these opinions. Preventing and managing online violence is a huge issue that requires the attention and cooperation of the entire society. In addition to the efforts of the platform, it also requires the cooperation and support of regulatory agencies, users, media, and other stakeholders. In an online violence incident, users may be direct perpetrators, direct or indirect spreaders, or victims. Users should pay attention to regulating their own \"civilized internet\" behavior habits. Adhere to the boundaries of freedom of speech and enhance the ability to identify online violent behavior. Report relevant content in a timely manner and learn about the platform's mechanisms for preventing online violence. Take self-protection measures to prevent the recurrence of online violence. Recently, the health condition of the giant panda Ya Ya, who is currently in the United States, has attracted a lot of attention and concern from netizens. Many parties have spoken up for Ya Ya, hoping for its early return. From the comments and support of netizens, we can feel the warmth of the Chinese people. The road ahead is still full of challenges, but we will never give up and never retreat. \"Panda diplomacy\" also enhances the vitality, innovation, cohesion, and dissemination power of national culture. On August twenty-fourth at twelve o'clock noon, the Fukushima Daiichi Nuclear Power Plant in Japan started discharging contaminated water into the sea. The ocean is the blue home on which all humanity relies for survival. Ignoring the public's opposition and persisting in the selfish act of discharging nuclear-contaminated water into the sea will pose a serious challenge to the ocean. Protecting the ocean is an indispensable responsibility for every country today. Protecting the ocean means safeguarding our common home and benefiting future generations. The act of Japan's pollution without the consent of the public will undoubtedly be severely condemned. Ocean security will also suffer incalculable damage. The merciful god has finally picked up the surgical knife again to save the world. Dr. Tao Yong, a genius ophthalmologist with superb medical skills, can perform up to eighty-six surgeries in a single day. So far, fifteen thousand patients have regained their sight. However, he was stabbed by a patient he had cured, and was unable to pick up the scalpel again. But he endured the severe pain and continued to do hand rehabilitation training day after day. Behind the daily cries of pain, there is his determination to return to the operating table and save more patients. As long as there is fireworks, darkness will eventually be dispelled. Finally, after three years, he found the light on that unclear path to the future. This kind-hearted god has come to patch up this world again! The little boy, Jiang Honghui, is seven years old this year. In the recently concluded Hunan Provincial Youth Championship, he won five gold and two silver medals. He said his dream is to become an Olympic champion when he grows up. Both of his parents are disabled, and the family lives in poverty. Despite the hardships of life and training, he never gives up. His hard work paid off, and he achieved remarkable results. With bright and determined eyes, he says he wants to become an Olympic champion when he grows up! The \"May Day\" Golden Week has ushered in a tourism boom. Whether it is the distance traveled by tourists, the level of consumption, or the number of visitors, this year's tourism heat has reached a new high in recent years. this year's tourism heat has reached a new high in recent years. Convenient and fast transportation options have allowed people to enjoy travel freedom. Diverse tourism choices meet the needs of various people for leisure. The tourism boom during the \"May Day\" holiday undoubtedly becomes an effective \"booster\" for local economic development. The essence of the Chinese Dream is a prosperous nation, a rejuvenated nation, and a happy people. To achieve great dreams, we must engage in great struggles, build great projects, and promote great causes. When the youth thrive, the nation thrives; when the youth are strong, the nation is strong. The youth should bravely become the trendsetters of the times. Fly your dreams of youth in the practice of realizing the Chinese Dream, and write a brilliant chapter of life in the struggle for the interests of the people. On March , the crew of Shenzhou fifteen conducted their second extravehicular activity. They have achieved multiple phased accomplishments during their three-month stay in orbit. Since the manned mission of Shenzhou twelve in two thousand and twenty-one year, The four astronauts have conducted a total of ten extravehicular activities, breaking through and mastering a series of key technologies. Currently, extravehicular activities have become routine work for the crew in orbit. They will continue to be carried out on a regular basis according to mission requirements. The Thirty-first World University Games opened grandly in Chengdu, with citizens participating in a healthy run to welcome the Games. Youth is blooming with unstoppable momentum, and the power of the youth is at its peak. Young athletes from various countries gather on the stage of the Chengdu University Games, Watering the most beautiful dreams with sweat, and painting the most vibrant background with hard work, they come together for a grand \"youth pact\". At the same time, it also inspires us to establish lofty ideals, develop our own abilities, Strive unremittingly on the track of life, and promote national prosperity and the rejuvenation of the nation with the vitality of youth. As the saying goes, it is better to travel ten thousand miles than to read ten thousand books. \"Textbook tours\" as a new mode of tourism not only enriches the content and improves the quality of tourism; It also allows children to personally experience the integration of knowledge and practice, and enhances their interest and efficiency in learning. At the same time, it can also plant a seed of cultural inheritance in their hearts, Which helps promote the promotion and dissemination of our excellent traditional culture. Chimpanzees are animals that can walk upright like humans, They enjoy living in groups, can use simple tools, and are known to be the second most intelligent animals after humans. Its behavior and social behavior are more similar to humans, which has significant implications for anthropological research. According to data released by Chinese musicians, there are over forty million children learning piano in China. This accounts for eighty percent of the global total and grows at a rate of ten percent annually. Recently, the Chinese lunar exploration space IP image \"Space Rabbit\" has officially announced its name. Its Chinese name is \"Tuxingxing\" (which means \"Rabbit Star\"), with the meaning of \"Jade Rabbit patrolling the moon, setting sail in the galaxy\". It is reported that in the first half of this year, China's three major shipbuilding indicators have all increased comprehensively. The international market share of the three major indicators, namely shipbuilding completion volume, new order volume, and order backlog volume, are all ranked first in the world. On August , two thousand and twenty-three year, the prestigious academic journal \"Science Bulletin\" published the latest research results. Chinese scientists have achieved precise synthesis of sugar from carbon dioxide, taking a crucial step towards artificial sugar synthesis. On August, the Ministry of Natural Resources released the \"Blue Book of China's Ecological Protection Red Line\". This is the first time that China has published the results of its ecological protection red line in the form of a blue book. The blue book indicates that the total area of the ecological protection red line designated nationwide is approximately three point nineteen million square kilometers, covering all thirty-five priority areas for biodiversity conservation in China and over ninety percent of typical ecosystem types. On September four, the \"Sauce Fragrance Latte\" coffee jointly launched by Guizhou Maotai and Luckin Coffee was officially launched. The traffic police remind everyone that for safety reasons, it is prohibited to drive after consuming alcoholic beverages. Typhoon Number Eleven \"Haikui\" made landfall in the coastal areas of Dongshan County, Fujian Province around five o'clock am this morning. The maximum wind force near the center during landing is 8 on the Beaufort scale (twenty meters/second), and the minimum central air pressure is nine hundred and ninety-five hectopascals. Today, all primary and secondary schools, as well as kindergartens in Fuzhou, have decided to suspend classes for one day. Recently, there have been frequent typhoons. I hope everyone is safe and well! 父主题: 文案样例(进阶版)
  • 新闻播报风格英文文案(20句) China is the first country in the world with over three million valid domestic invention patents, ranking first in the world. Recently, the topic of the chaotic charging of internet TV has been constantly trending. The nested membership and video-watching model of internet TV platforms has made many netizens express strong dislike. With the strengthening of copyright protection awareness, users are willing to pay to watch film and television content. However, businesses have overlooked the viewing experience of consumers while charging. The poor health condition of Ya Ya, a giant panda living in the United States, has attracted a lot of attention and concern from netizens. Many parties have spoken up for Ya Ya, hoping for its early return. At twelve o'clock noon on August twenty-fourth, the Fukushima Daiichi Nuclear Power Plant in Japan started discharging nuclear-contaminated water into the sea. The ocean is the blue home on which all humanity depends for survival. Ignoring the opposition of the public and persisting in the selfish act of discharging nuclear-contaminated water into the sea will pose a severe challenge to the ocean. Jiang Honghui, a seven-year-old boy, won five gold and two silver medals in the recently concluded Hunan Provincial Youth Championship. Despite the hardships of life and the difficulties of training, he has not retreated and aspires to become an Olympic champion when he grows up! The \"May Day\" Golden Week has ushered in a tourism boom, and this year's tourism popularity has reached a historical high in recent years. On March, the crew of Shenzhou fifteen conducted a second extravehicular activity and achieved multiple phased achievements in three months in orbit. The Thirty-first World University Games opened grandly in Chengdu, with citizens participating in a healthy run to welcome the Games. According to data released by Chinese musicians, there are over forty million children learning the piano in China. Recently, the Chinese lunar exploration space IP image \"Space Rabbit\" has officially announced its name. Its Chinese name is \"Tuxingxing\" (which means \"Rabbit Star\"), with the meaning of \"Jade Rabbit patrolling the moon, setting sail in the galaxy\". It is reported that in the first half of this year, China's three major shipbuilding indicators have all experienced comprehensive growth. The international market share of the three major indicators, including completed shipbuilding, new orders, and order backlog, is ranked first in the world. 父主题: 文案样例(基础版)
  • 监控指标 表1 弹性公网IP和带宽以及全域弹性公网IP和公网带宽支持的监控指标 指标ID 指标名称 指标含义 取值范围 测量对象 监控周期(原始指标) upstream_bandwidth 出网带宽 该指标用于统计测试对象出云平台的网络速度(原指标为上行带宽)。 单位:比特/秒 ≥ 0 bit/s 带宽或弹性公网IP 全域弹性公网IP或公网带宽 1分钟 downstream_bandwidth 入网带宽 该指标用于统计测试对象入云平台的网络速度(原指标为下行带宽)。 单位:比特/秒 ≥ 0 bit/s 带宽或弹性公网IP 全域弹性公网IP或公网带宽 1分钟 upstream_bandwidth_usage 出网带宽使用率 该指标用于统计测量对象出云平台的带宽使用率,以百分比为单位。 出网带宽使用率=出网带宽指标/购买的带宽大小 0-100% 带宽或弹性公网IP 全域弹性公网IP或公网带宽 1分钟 downstream_bandwidth_usage 入网带宽使用率 该指标用于统计测量对象入云平台的带宽使用率,以百分比为单位。 入网带宽使用率=入网带宽指标/购买的带宽大小 说明: 由于华为云在部分站点对10Mbps以下的配置带宽提供10Mbps的入网带宽上限,此时监控的入网带宽使用率会存在大于100%的情况。 EIP使用时修改带宽大小,带宽使用率的指标同步生效会有5~10min的延时。 0-100% 带宽或弹性公网IP 全域弹性公网IP或公网带宽 1分钟 up_stream 出网流量 该指标用于统计测试对象出云平台的网络流量(原指标为上行流量)。 单位:字节 ≥ 0 Bytes 带宽或弹性公网IP 全域弹性公网IP或公网带宽 1分钟 down_stream 入网流量 该指标用于统计测试对象入云平台的网络流量(原指标为下行流量)。 单位:字节 ≥ 0 Bytes 带宽或弹性公网IP 全域弹性公网IP或公网带宽 1分钟 带宽规格变更(带宽升降配)后,带宽规格数据在监控指标上生效有5~10min的时间延迟。
  • 维度 Key Value publicip_id 弹性公网IP ID bandwidth_id 带宽ID geip_global_eip_id 全域弹性公网IP ID geip_internet_bandwidth_id 公网带宽ID 对于有多个测量维度的测量对象,使用接口查询监控指标时,所有测量维度均为必选。 查询单个监控指标时,多维度dim使用样例:dim.0=bandwidth_id,530cd6b0-86d7-4818-837f-935f6a27414d&dim.1=publicip_id,3773b058-5b4f-4366-9035-9bbd9964714a。 批量查询监控指标时,多维度dim使用样例: "dimensions": [ { "name": "bandwidth_id", "value": "530cd6b0-86d7-4818-837f-935f6a27414d" }, { "name": "publicip_id", "value": "3773b058-5b4f-4366-9035-9bbd9964714a" } ],
  • 请求示例 实例请求体 https://coc.myhuaweicloud.com/v1/job/scripts { "type" : "SHELL", "content" : "echo ${value}", "name" : "09101112", "description" : "实例脚本", "properties" : { "risk_level" : "HIGH", "version" : "1.0.0", "reviewers" : [ { "reviewer_name" : "test", "reviewer_id" : "7a8513cd87b7448283a1d5190eb91234" } ], "protocol" : "WECHAT" }, "script_params" : [ { "param_name" : "a", "param_value" : "string", "param_description" : "string", "param_order" : 1, "sensitive" : true } ] }
  • 请求参数 表1 请求Body参数 参数 是否必选 参数类型 描述 name 是 String 脚本名称:只能包含中文、英文、数字、下划线 最小长度:1 最大长度:64 properties 是 ScriptPropertiesModel object 脚本标签: 风险等级risk_level(取值范围:LOW/MEDIUM/HIGH)、审批人reviewer、脚本解释器interpreter等 description 是 String 脚本描述 最小长度:1 最大长度:256 type 是 String 脚本类型: 对于脚本后缀: SHELL:.sh PYTHON:.py BAT:.bat 枚举值: SHELL PYTHON BAT content 是 String 脚本内容 最小长度:1 最大长度:4096 script_params 否 Array of ScriptParamDefine objects 脚本入参 数组长度:0 - 20 表2 ScriptPropertiesModel 参数 是否必选 参数类型 描述 risk_level 是 String 风险等级 LOW:低风险 MEDIUM:中风险 HIGH:高风险 枚举值: LOW MEDIUM HIGH version 是 String 脚本版本号 最小长度:1 最大长度:10 reviewers 否 Array of ReviewerInfo objects 审批人,不填写不需要审批 数组长度:0 - 5 protocol 否 String 审批消息通知协议,用于通知审批人 DEFAULT:默认 SMS:短信 EMAIL:邮件 DING_TALK:钉钉 WE_LINK:welink WECHAT:微信 CALLNOTIFY:语言 NOT_TO_NOTIFY:不通知 枚举值: DEFAULT SMS EMAIL DING_TALK WE_LINK WECHAT CALLNOTIFY NOT_TO_NOTIFY 表3 ReviewerInfo 参数 是否必选 参数类型 描述 reviewer_name 是 String 审批人名称(IAM用户名) 最小长度:1 最大长度:64 reviewer_id 是 String 审批人ID(IAM用户Id) 最小长度:0 最大长度:32 表4 ScriptParamDefine 参数 是否必选 参数类型 描述 param_name 是 String 参数名称:只支持英文、数字、下划线 最小长度:1 最大长度:64 param_value 是 String 参数默认值 最小长度:0 最大长度:1024 param_description 是 String 参数描述 最小长度:0 最大长度:256 param_order 是 Integer 参数顺序,从1开始,保持连续 最小值:1 最大值:20 sensitive 是 Boolean 是否是敏感参数
  • 功能介绍 创建作业脚本:自定义脚本 脚本有标签属性,表示是高危脚本。创建时候不需要对脚本进行是否是高危的二次校验。 进行租户隔离;北向接口创建的脚本,审批人字段不填写,默认不需要审批 约束条件: 脚本名称:同一租户下,脚本名称不能重复,最大字符64个字符,支持中文+字母+数字+下划线。 脚本内容最大4096个字符。 脚本参数个数最多20个。 脚本描述:最大256个字符。 单个参数的参数名称 64个字符,只支持字母+数字+下划线。 单个参数的值最大1024个字符,正则表达式如下:^((?!.{2,})[a-zA-Z0-9_-/.*\x20?:",=+@\[{]}])*$。 审批人最多支持5人。 脚本输出的日志总量只支持1MB。
  • 响应参数 状态码: 200 表2 响应Body参数 参数 参数类型 描述 total Long 总条数 最小值:1 最大值:9223372036854775807 data Array of ScriptListModel objects 单页数据列表 数组长度:1 - 100 表3 ScriptListModel 参数 参数类型 描述 id Long 脚本自增id 最小值:1 最大值:9223372036854775807 script_uuid String 脚本uuid 最小长度:1 最大长度:25 name String 脚本名称 最小长度:1 最大长度:64 type String 脚本类型 SHELL:shell脚本 PYTHON:python脚本 BAT:bat脚本 枚举值: SHELL PYTHON BAT status String 脚本状态 PENDING_APPROVE:待审批 APPROVED:正常(审批通过) REJECTED:驳回(审批人,驳回该脚本 枚举值: PENDING_APPROVE APPROVED REJECTED gmt_created Long 创建时间 最小值:1 最大值:9223372036854775807 gmt_modified Long 修改时间 最小值:1 最大值:9223372036854775807 creator String 创建人 最小长度:1 最大长度:64 creator_id String 创建人Id 最小长度:1 最大长度:64 operator String 修改人 最小长度:1 最大长度:64 properties ScriptPropertiesModel object 脚本标签:风险等级risk_level(取值范围:LOW/MEDIUM/HIGH)、审批人reviewer 表4 ScriptPropertiesModel 参数 参数类型 描述 risk_level String 风险等级 LOW:低风险 MEDIUM:中风险 HIGH:高风险 枚举值: LOW MEDIUM HIGH version String 脚本版本号 最小长度:1 最大长度:10 reviewers Array of ReviewerInfo objects 审批人,不填写不需要审批 数组长度:0 - 5 protocol String 审批消息通知协议,用于通知审批人 DEFAULT:默认 SMS:短信 EMAIL:邮件 DING_TALK:钉钉 WE_LINK:welink WECHAT:微信 CALLNOTIFY:语言 NOT_TO_NOTIFY:不通知 枚举值: DEFAULT SMS EMAIL DING_TALK WE_LINK WECHAT CALLNOTIFY NOT_TO_NOTIFY 表5 ReviewerInfo 参数 参数类型 描述 reviewer_name String 审批人名称(IAM用户名) 最小长度:1 最大长度:64 reviewer_id String 审批人ID(IAM用户Id) 最小长度:0 最大长度:32 状态码: 400 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512
  • URI GET /v1/job/scripts 表1 Query参数 参数 是否必选 参数类型 描述 limit 是 Integer 分页参数:每页返回记录个数限制 最小值:1 最大值:100 marker 否 Long 分页参数:上一页最后一个记录id 最小值:0 最大值:9223372036854775807 name_like 否 String 脚本名(模糊) 最小长度:1 最大长度:32 creator 否 String 创建人 最小长度:1 最大长度:64 risk_level 否 String 风险等级 LOW:低风险 MEDIUM:中风险 HIGH:高风险 枚举值: LOW MEDIUM HIGH type 否 String 脚本类型 SHELL:shell脚本 PYTHON:python脚本 BAT:Bat脚本 枚举值: SHELL PYTHON BAT
  • 请求示例 https://coc.myhuawei.com/v1/job/scripts/{script_uuid} { "execute_param" : { "timeout" : 300, "execute_user" : "root", "success_rate" : "100.0", "script_params" : [ { "param_name" : "a", "param_value" : "key1", "param_order" : 1 } ] }, "execute_batches" : [ { "batch_index" : 1, "rotation_strategy" : "CONTINUE", "target_instances" : [ { "resource_id" : "resource_id", "agent_sn" : "agent_sn", "agent_status" : "ONLINE", "region_id" : "cn-north-7", "project_id" : "project_id" } ] } ] }
  • 请求参数 表2 请求Body参数 参数 是否必选 参数类型 描述 description 是 String 脚本描述 最小长度:1 最大长度:256 content 是 String 脚本内容 最小长度:1 最大长度:4096 properties 否 ScriptPropertiesModel object 风险等级:LOW;HIGH;MEDIUM;审批人只支持修改 script_params 否 Array of ScriptParamDefine objects 脚本入参 数组长度:0 - 5 表3 ScriptPropertiesModel 参数 是否必选 参数类型 描述 risk_level 是 String 风险等级 LOW:低风险 MEDIUM:中风险 HIGH:高风险 枚举值: LOW MEDIUM HIGH version 是 String 脚本版本号 最小长度:1 最大长度:10 reviewers 否 Array of ReviewerInfo objects 审批人,不填写不需要审批 数组长度:0 - 5 protocol 否 String 审批消息通知协议,用于通知审批人 DEFAULT:默认 SMS:短信 EMAIL:邮件 DING_TALK:钉钉 WE_LINK:welink WECHAT:微信 CALLNOTIFY:语言 NOT_TO_NOTIFY:不通知 枚举值: DEFAULT SMS EMAIL DING_TALK WE_LINK WECHAT CALLNOTIFY NOT_TO_NOTIFY 表4 ReviewerInfo 参数 是否必选 参数类型 描述 reviewer_name 是 String 审批人名称(IAM用户名) 最小长度:1 最大长度:64 reviewer_id 是 String 审批人ID(IAM用户Id) 最小长度:0 最大长度:32 表5 ScriptParamDefine 参数 是否必选 参数类型 描述 param_name 是 String 参数名称:只支持英文、数字、下划线 最小长度:1 最大长度:64 param_value 是 String 参数默认值 最小长度:0 最大长度:1024 param_description 是 String 参数描述 最小长度:0 最大长度:256 param_order 是 Integer 参数顺序,从1开始,保持连续 最小值:1 最大值:20 sensitive 是 Boolean 是否是敏感参数
  • 请求示例 https://coc.myhuaweicloud.com/v1/job/scripts/SC2023110211155901a700000 { "type" : "SHELL", "content" : "echo ${a}", "name" : "019101112", "description" : "修改", "properties" : { "risk_level" : "HIGH", "version" : "1.1.1", "reviewers" : [ ] }, "script_params" : [ { "param_name" : "a", "param_value" : "string", "param_description" : "string", "param_order" : 1, "sensitive" : true } ] }
  • 功能介绍 修改作业脚本:自定义脚本 约束条件: 脚本名称:同一租户下,脚本名称不能重复,最大字符64个字符,支持中文+字母+数字+下划线。 脚本内容最大4096个字符。 脚本参数个数最多20个。 脚本描述:最大256个字符。 单个参数的参数名称 64个字符,只支持字母+数字+下划线。 单个参数的值最大1024个字符,正则表达式如下:^((?!.{2,})[a-zA-Z0-9_-/.\x20?:",=+@[{]}])$。 修改的脚本如果有审批人,在修改之后,需要再次选择审批人,查询审批
  • 响应参数 状态码: 200 表2 响应Body参数 参数 参数类型 描述 script_uuid String 脚本uuid 最小长度:1 最大长度:25 name String 脚本名称 最小长度:1 最大长度:64 version String 脚本版本号 约束条件 后期废除,不建议使用 最小长度:1 最大长度:16 description String 脚本描述 最小长度:1 最大长度:256 type String 脚本类型 SHELL:shell脚本, PYTHON:Python脚本, BAT:Bat脚本, 枚举值: SHELL PYTHON BAT content String 脚本内容 最小长度:1 最大长度:4096 script_params Array of ScriptParamDefine objects 脚本入参 数组长度:0 - 20 status String 脚本状态 PENDING_APPROVE:待审批 APPROVED:正常(审批通过) REJECTED:驳回(审批人,驳回该脚本) 枚举值: PENDING_APPROVE APPROVED REJECTED gmt_created Long 创建时间 最小值:1 最大值:9223372036854775807 gmt_modified Long 修改时间 最小值:1 最大值:9223372036854775807 creator String 创建人 最小长度:1 最大长度:64 creator_id String 创建人Id 最小长度:1 最大长度:32 operator String 修改人 最小长度:1 最大长度:32 properties ScriptPropertiesModel object 脚本标签:风险等级risk_level(取值范围:LOW/MEDIUM/HIGH)、审批人reviewer、脚本解释器interpreter等 表3 ScriptParamDefine 参数 参数类型 描述 param_name String 参数名称:只支持英文、数字、下划线 最小长度:1 最大长度:64 param_value String 参数默认值 最小长度:0 最大长度:1024 param_description String 参数描述 最小长度:0 最大长度:256 param_order Integer 参数顺序,从1开始,保持连续 最小值:1 最大值:20 sensitive Boolean 是否是敏感参数 表4 ScriptPropertiesModel 参数 参数类型 描述 risk_level String 风险等级 LOW:低风险 MEDIUM:中风险 HIGH:高风险 枚举值: LOW MEDIUM HIGH version String 脚本版本号 最小长度:1 最大长度:10 reviewers Array of ReviewerInfo objects 审批人,不填写不需要审批 数组长度:0 - 5 protocol String 审批消息通知协议,用于通知审批人 DEFAULT:默认 SMS:短信 EMAIL:邮件 DING_TALK:钉钉 WE_LINK:welink WECHAT:微信 CALLNOTIFY:语言 NOT_TO_NOTIFY:不通知 枚举值: DEFAULT SMS EMAIL DING_TALK WE_LINK WECHAT CALLNOTIFY NOT_TO_NOTIFY 表5 ReviewerInfo 参数 参数类型 描述 reviewer_name String 审批人名称(IAM用户名) 最小长度:1 最大长度:64 reviewer_id String 审批人ID(IAM用户Id) 最小长度:0 最大长度:32
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 rules Array of rules objects 风险规则列表 total Integer 总数 表5 rules 参数 参数类型 描述 id String 风险规则ID name String 风险规则名称 type String 风险类型 feature String 风险特征 status String 风险规则状态 rank Integer 风险规则优先级 risk_level String 风险级别 状态码: 400 表6 响应Body参数 参数 参数类型 描述 error Object 错误信息返回体。 表7 ErrorDetail 参数 参数类型 描述 error_code String 错误请求返回的错误码。 error_msg String 错误请求返回的错误信息。 状态码: 403 表8 响应Body参数 参数 参数类型 描述 error Object 错误信息返回体。 表9 ErrorDetail 参数 参数类型 描述 error_code String 错误请求返回的错误码。 error_msg String 错误请求返回的错误信息。 状态码: 500 表10 响应Body参数 参数 参数类型 描述 error Object 错误信息返回体。 表11 ErrorDetail 参数 参数类型 描述 error_code String 错误请求返回的错误码。 error_msg String 错误请求返回的错误信息。
  • 响应示例 状态码: 200 成功 { "rules" : [ { "id" : "xX4W2ngBo47GiyUSBeOy", "name" : "Database_drag_detection", "type" : "OPERATE", "feature" : "CLIENT[Any]OPERATE[[SELECT]OBJECT[Any]", "status" : "ON", "rank" : -1, "risk_level" : "HIGH" }, { "id" : "xn4W2ngBo47GiyUSBeP4", "name" : "Database_Slow_SQL_Detection", "type" : "OPERATE", "feature" : "CLIENT[Any]OPERATE[[SELECT]OBJECT[Any]", "status" : "ON", "rank" : -2, "risk_level" : "LOW" } ], "total" : 2 } 状态码: 400 请求参数错误 { "error" : { "error_code" : "DBSS.XXXX", "error_msg" : "XXX" } } 状态码: 500 服务器内部错误 { "error" : { "error_code" : "DBSS.XXXX", "error_msg" : "XXX" } }
  • URI GET /v1/{project_id}/{instance_id}/dbss/audit/rule/risk 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID instance_id 是 String 实例ID 表2 Query参数 参数 是否必选 参数类型 描述 name 否 String 风险名称 risk_levels 否 String 风险级别[LOW,MEDIUM,HIGH,NO_RISK]
  • 响应示例 状态码: 200 成功 { "resources" : [ { "resource_detail" : null, "resource_id" : "cdfs_cefs_wesas_12_dsad", "resource_name" : "resouece1", "tags" : [ { "key" : "key1", "value" : "value1" }, { "key" : "key2", "value" : "value1" } ], "sys_tags" : [ { "key" : "_sys_enterprise_project_id", "value" : "5aa119a8-d25b-45a7-8d1b-88e127885635" } ] } ], "total_count" : 1000 } 状态码: 400 失败 { "error" : { "error_code" : "DBSS.XXXX", "error_msg" : "XXX" } }
  • 请求示例 /v1/{project_id}/{resource_type}/resource-instances/filter { "matches" : [ { "key" : "resource_name", "value" : "resource1" } ], "not_tags" : [ { "key" : "key1", "values" : [ "*value1", "value2" ] } ], "tags" : [ { "key" : "key1", "values" : [ "*value1", "value2" ] } ], "tags_any" : [ { "key" : "key1", "values" : [ "value1", "value2" ] } ], "not_tags_any" : [ { "key" : "key1", "values" : [ "value1", "value2" ] } ], "sys_tags" : [ { "key" : "_sys_enterprise_project_id", "values" : [ "5aa119a8-d25b-45a7-8d1b-88e127885635" ] } ] }
  • 响应参数 状态码: 200 表7 响应Body参数 参数 参数类型 描述 resources Array of resources objects 资源实例列表 total_count Integer 总记录数 表8 resources 参数 参数类型 描述 resource_detail Object 资源详情。 资源对象,用于扩展。默认为空 resource_id String 资源ID resource_name String 资源名称,资源没有名称时默认为空字符串,eip返回ip地址 tags Array of tags objects 标签列表,没有标签默认为空数组 sys_tags Array of sys_tags objects 仅op_service权限才可以可以获取此字段: 目前只包含一个resource_tag 结构体 key:_sys_enterprise_project_id value:企业项目id,0表示默认企业项目 非op_service场景不能返回此字段 表9 tags 参数 参数类型 描述 key String 键 value String 值 表10 sys_tags 参数 参数类型 描述 key String 键 value String 值 状态码: 400 表11 响应Body参数 参数 参数类型 描述 error Object 错误信息返回体。 表12 ErrorDetail 参数 参数类型 描述 error_code String 错误请求返回的错误码。 error_msg String 错误请求返回的错误信息。 状态码: 403 表13 响应Body参数 参数 参数类型 描述 error Object 错误信息返回体。 表14 ErrorDetail 参数 参数类型 描述 error_code String 错误请求返回的错误码。 error_msg String 错误请求返回的错误信息。 状态码: 500 表15 响应Body参数 参数 参数类型 描述 error Object 错误信息返回体。 表16 ErrorDetail 参数 参数类型 描述 error_code String 错误请求返回的错误码。 error_msg String 错误请求返回的错误信息。
  • URI POST /v1/{project_id}/{resource_type}/resource-instances/filter 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID resource_type 是 String 资源类型。审计:auditInstance 表2 Query参数 参数 是否必选 参数类型 描述 limit 否 String 查询记录数(action为count时无此参数)如果action为filter默认为1000,limit最多为1000,不能为负数,最小值为1 offset 否 String 索引位置,偏移量(action为count时无此参数)从第一条数据偏移offset条数据后开始查询,如果action为filter默认为0(偏移0条数据,表示从第一条数据开始查询),必须为数字,不能为负数
  • 请求参数 表3 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token 表4 请求Body参数 参数 是否必选 参数类型 描述 matches 否 Array of matches objects 搜索字段,key为要匹配的字段,如resource_name等。value为匹配的值。key为固定字典值,不能包含重复的key或不支持的key。 根据key的值确认是否需要模糊匹配,如resource_name默认为模糊搜索(不区分大小写),如果value为空字符串精确匹配(多数服务不存在资源名称为空的情况,因此此类情况返回空列表)。resource_id为精确匹配。第一期只做resource_name,后续再扩展。 not_tags 否 Array of TagKeyValuesBean objects 不包含标签,最多包含50个key,每个key下面的value最多10个, 每个key对应的value可以为空数组但结构体不能缺失。Key不能重复,同一个key中values不能重复。结果返回不包含标签的资源列表,key之间是与的关系,key-value结构中value是或的关系。无过滤条件时返回全量数据 tags 否 Array of TagKeyValuesBean objects 包含标签,最多包含50个key,每个key下面的value最多10个,每个key对应的value可以为空数组但结构体不能缺失。Key不能重复,同一个key中values不能重复。结果返回包含所有标签的资源列表,key之间是与的关系,key-value结构中value是或的关系。无tag过滤条件时返回全量数据 tags_any 否 Array of TagKeyValuesBean objects 包含任意标签,最多包含50个key,每个key下面的value最多10个, 每个key对应的value可以为空数组但结构体不能缺失。Key不能重复,同一个key中values不能重复。结果返回包含标签的资源列表,key之间是或的关系,key-value结构中value是或的关系。无过滤条件时返回全量数据 not_tags_any 否 Array of TagKeyValuesBean objects 不包含任意标签,最多包含50个key,每个key下面的value最多10个, 每个key对应的value可以为空数组但结构体不能缺失。Key不能重复,同一个key中values不能重复。结果返回不包含标签的资源列表,key之间是或的关系,key-value结构中value是或的关系。无过滤条件时返回全量数据 sys_tags 否 TagKeyValuesBean object 仅op_service权限可以使用此字段做资源实例过滤条件。目前TMS调用时只包含一个tag结构体。key:_sys_enterprise_project_idvalue:企业项目id列表目前TMS调用时,key下面只包含一个value。0表示默认企业项目sys_tags和租户标签过滤条件(without_any_tag 、tags、tags_any、not_tags、not_tags_any)不能同时使用无sys_tags时按照tag接口处理,无tag过滤条件时返回全量数据 without_any_tag 否 Boolean 不包含任意一个标签,该字段为true时查询所有不带标签的资源,此时忽略 “tags”、“tags_any”、“not_tags”、“not_tags_any”字段 表5 matches 参数 是否必选 参数类型 描述 key 否 String 键 value 否 String 值 表6 TagKeyValuesBean 参数 是否必选 参数类型 描述 key 是 String 键。最大长度128个unicode字符。 key不能为空。(搜索时不对此参数做字符集校验),key不能为空或者空字符串,不能为空格,校验和使用之前先trim 前后半角空格 values 是 Array of strings 值列表。每个值最大长度255个unicode字符,校验和使用之前先trim 前后半角空格。 value可为空数组但不可缺省。 如果values为空列表,则表示any_value(查询任意value)。value之间为或的关系
  • 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" dbss "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dbss/v1" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dbss/v1/model" region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dbss/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 := dbss.NewDbssClient( dbss.DbssClientBuilder(). WithRegion(region.ValueOf("cn-north-4")). WithCredential(auth). Build()) request := &model.ListProjectResourceTagsRequest{} response, err := client.ListProjectResourceTags(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 huaweicloudsdkdbss.v1.region.dbss_region import DbssRegion from huaweicloudsdkcore.exceptions import exceptions from huaweicloudsdkdbss.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 = DbssClient.new_builder() \ .with_credentials(credentials) \ .with_region(DbssRegion.value_of("cn-north-4")) \ .build() try: request = ListProjectResourceTagsRequest() response = client.list_project_resource_tags(request) print(response) except exceptions.ClientRequestException as e: print(e.status_code) print(e.request_id) print(e.error_code) print(e.error_msg)
  • 响应示例 状态码: 200 成功 { "tags" : [ { "key" : "key1", "values" : [ "value1", "value2" ] }, { "key" : "key2", "values" : [ "value1", "value2" ] } ] } 状态码: 400 失败 { "error" : { "error_code" : "DBSS.XXXX", "error_msg" : "XXX" } }
  • 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.dbss.v1.region.DbssRegion; import com.huaweicloud.sdk.dbss.v1.*; import com.huaweicloud.sdk.dbss.v1.model.*; public class ListProjectResourceTagsSolution { 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); DbssClient client = DbssClient.newBuilder() .withCredential(auth) .withRegion(DbssRegion.valueOf("cn-north-4")) .build(); ListProjectResourceTagsRequest request = new ListProjectResourceTagsRequest(); try { ListProjectResourceTagsResponse response = client.listProjectResourceTags(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参数 参数 参数类型 描述 tags Array of tags objects 标签列表 表4 tags 参数 参数类型 描述 key String 键。最大长度128个字符。 key满足3.1 KEY字符集规范。 values Array of strings 值列表。每个值最大长度255个字符。 value满足3.2 VALUE字符集规范。 状态码: 400 表5 响应Body参数 参数 参数类型 描述 error Object 错误信息返回体。 表6 ErrorDetail 参数 参数类型 描述 error_code String 错误请求返回的错误码。 error_msg String 错误请求返回的错误信息。 状态码: 403 表7 响应Body参数 参数 参数类型 描述 error Object 错误信息返回体。 表8 ErrorDetail 参数 参数类型 描述 error_code String 错误请求返回的错误码。 error_msg String 错误请求返回的错误信息。 状态码: 500 表9 响应Body参数 参数 参数类型 描述 error Object 错误信息返回体。 表10 ErrorDetail 参数 参数类型 描述 error_code String 错误请求返回的错误码。 error_msg String 错误请求返回的错误信息。
  • 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 30 31 32 33 # coding: utf-8 from huaweicloudsdkcore.auth.credentials import BasicCredentials from huaweicloudsdkdbss.v1.region.dbss_region import DbssRegion from huaweicloudsdkcore.exceptions import exceptions from huaweicloudsdkdbss.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 = DbssClient.new_builder() \ .with_credentials(credentials) \ .with_region(DbssRegion.value_of("cn-north-4")) \ .build() try: request = SwitchAgentRequest() request.body = AgentSwitchRequest( status=1, agent_id="ASWDSDSDSWEWDSDSD" ) response = client.switch_agent(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 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 package main import ( "fmt" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" dbss "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dbss/v1" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dbss/v1/model" region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dbss/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 := dbss.NewDbssClient( dbss.DbssClientBuilder(). WithRegion(region.ValueOf("cn-north-4")). WithCredential(auth). Build()) request := &model.SwitchAgentRequest{} request.Body = &model.AgentSwitchRequest{ Status: int32(1), AgentId: "ASWDSDSDSWEWDSDSD", } response, err := client.SwitchAgent(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 46 47 48 49 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.dbss.v1.region.DbssRegion; import com.huaweicloud.sdk.dbss.v1.*; import com.huaweicloud.sdk.dbss.v1.model.*; public class SwitchAgentSolution { 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); DbssClient client = DbssClient.newBuilder() .withCredential(auth) .withRegion(DbssRegion.valueOf("cn-north-4")) .build(); SwitchAgentRequest request = new SwitchAgentRequest(); AgentSwitchRequest body = new AgentSwitchRequest(); body.withStatus(1); body.withAgentId("ASWDSDSDSWEWDSDSD"); request.withBody(body); try { SwitchAgentResponse response = client.switchAgent(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()); } } }
共100000条