华为云用户手册

  • 开启本地集群控制面日志 集群未安装云原生日志采集插件 安装云原生日志采集插件时,可通过勾选对应控制面组件,创建默认日志采集策略,采集对应组件日志上报到LTS。安装方法见:启用云原生日志采集插件采集日志。 集群已安装云原生日志采集插件 登录容器舰队控制台,单击集群名称进入集群,选择左侧导航栏的“日志中心”。 右上角单击“日志采集策略”,将显示当前集群所有上报LTS的日志策略。 单击上方“创建日志策略”,输入要采集的配置信息。 策略模板:若安装插件时未开启控制面组件的采集策略,或者删除了对应的日志策略,可通过该方式重新创建对应组件采集策略。 日志查看:可直接在“日志中心”页面,“控制面组件日志”页签中查看,选择日志策略配置的日志流名称,即可查看上报到 云日志 服务(LTS)的日志。
  • asm-iam-authenticator使用参考 asm-iam-authenticator作为k8s client端的认证插件,主要提供了generate-kubeconfig和token两个子命令。 A tool to authenticate to ASM using HuaweiCloud IAM credentials Usage: asm-iam-authenticator [command] Available Commands: completion Generate the autocompletion script for the specified shell generate-kubeconfig Generate or modify kubeconfig files based on user configuration help Help about any command token Authenticate using HuaweiCloud IAM and get token for ASM Flags: --alsologtostderr log to standard error as well as files (no effect when -logtostderr=true) -h, --help help for asm-iam-authenticator --log_dir string If non-empty, write log files in this directory (no effect when -logtostderr=true) --log_file string If non-empty, use this log file (no effect when -logtostderr=true) --logtostderr log to standard error instead of files (default true) -v, --v Level number for the log level verbosity --version version for asm-iam-authenticator Use "asm-iam-authenticator [command] --help" for more information about a command. 其中,Flags主要为日志选项。 token token子命令用于获取用户token,获取token的认证方式有用户名/密码、ak/sk两种,选择其中一种即可。 Authenticate using HuaweiCloud IAM and get token for ASM Usage: asm-iam-authenticator token [flags] Flags: --ak string IAM access key ID --aksk-dir string The directory of IAM access key(AK) and secret access key(SK) --cache Cache the token credential on disk until it expires (default true) --domain-name string IAM domain name, typically your account name -h, --help help for token --iam-endpoint string HuaweiCloud IAM endpoint, i.e. https://iam.cn-north-4.myhuaweicloud.com (default "https://iam.myhuaweicloud.com") --insecure-skip-tls-verify If true, the iam server's certificate will not be checked for validity. (default true) --password string IAM user password --project-id string IAM project id, project id and project name should not be empty at same time --project-name string IAM project name, project id and project name should not be empty at same time --sk string IAM secret access key --token-expired-refresh Whether refresh the cached token when it may have expired resulting unauthorized. If true, we will use client.authentication.k8s.io/v1alpha1 api version. Otherwise, use client.authentication.k8s.io/v1beta1 --token-only Return token only for other tool integration --user-name string IAM user name. Same as domain-name when using main account, otherwise use iam user name 其中,Flags分为用户名密码、AKSK和公共配置。 表1 用户名/密码配置 Command Flag Environment Value Description domain-name DOMAIN_NAME 租户名,即账号名,详情请参见https://support.huaweicloud.com/usermanual-ca/ca_01_0001.html。 user-name USER_NAME 子用户名,即IAM用户名。若不配置与domain-name一致。 详情请参见https://support.huaweicloud.com/usermanual-ca/ca_01_0001.html。 password PASSWORD 用户或子用户密码。 表2 AK/SK配置 Command Flag Environment Value Description ak AC CES S_KEY_ID ak、sk的获取方法请参见获取AK/SK,ak为文件中Access Key部分,sk为文件中Secret Key部分。 sk SECRET_ACCESS_KEY 表3 公共配置 Command Flag Environment Value Description iam-endpoint IAM_ENDPOINT IAM的Endpoint,必须配置,详情请参见https://developer.huaweicloud.com/endpoint?IAM。 project-name PROJECT_NAME 项目名,详情请参见https://support.huaweicloud.com/usermanual-ca/ca_01_0001.html。 project-id PROJECT_ID 项目ID,详情请参见https://support.huaweicloud.com/usermanual-ca/ca_01_0001.html。 insecure-skip-tls-verify INSECURE_SKIP_TLS_VERIFY 是否跳过对CCI/IAM服务端的校验,默认为true。 cache CREDENTIAL_CACHE 是否开启将IAM Token缓存到本地,提高访问性能,默认为true。 注意: 在非安全环境,建议关闭此选项。 generate-kubeconfig 为用户直接生成KubeConfig配置,若指定的KubeConfig已存在,则会注入新的server、user、context配置,并将当前的KubeConfig context切换到此次配置的结果。 Generate or modify kubeconfig files based on user configuration. Sets a cluster entry, a user entry and a context entry in kubeconfig and use this context as the current-context. The loading order follows these rules: 1. If the --kubeconfig flag is set, then only that file is loaded. The flag may only be set once and no merging takes place. 2. If $KUBECONFIG environment variable is set, then it is used as a list of paths (normal path delimiting rules for your system). These paths are merged. When a value is modified, it is modified in the file that defines the stanza. When a value is created, it is created in the first file that exists. If no files in the chain exist, then it creates the last file in the list. 3. Otherwise, ${HOME}/.kube/config is used and no merging takes place. Examples: # Generate kubeconfig to ${HOME}/.kube/config using aksk asm-iam-authenticator generate-kubeconfig --mesh-endpoint=https://127.0.0.1:5443 --ak=*** --sk=*** # Generate kubeconfig to ${HOME}/.kube/config using domain name and password asm-iam-authenticator generate-kubeconfig --mesh-endpoint=https://127.0.0.1:5443 --domain-name=*** --password=*** Usage: asm-iam-authenticator generate-kubeconfig [flags] Flags: --ak string IAM access key ID --aksk-dir string The directory of IAM access key(AK) and secret access key(SK) --cache Cache the token credential on disk until it expires (default true) --domain-name string IAM domain name, typically your account name -h, --help help for generate-kubeconfig --iam-endpoint string HuaweiCloud IAM endpoint, i.e. https://iam.cn-north-4.myhuaweicloud.com (default "https://iam.myhuaweicloud.com") --insecure-skip-tls-verify If true, the iam server's certificate will not be checked for validity. (default true) --kubeconfig string use a particular kubeconfig file --mesh-endpoint string Mesh server endpoint, i.e. https://127.0.0.1:5443 --mesh-region string Mesh region, i.e. cn-north-4 --password string IAM user password --project-id string IAM project id, project id and project name should not be empty at same time --project-name string IAM project name, project id and project name should not be empty at same time --sk string IAM secret access key --token-expired-refresh Whether refresh the cached token when it may have expired resulting unauthorized. If true, we will use client.authentication.k8s.io/v1alpha1 api version. Otherwise, use client.authentication.k8s.io/v1beta1 --token-only Return token only for other tool integration --user-name string IAM user name. Same as domain-name when using main account, otherwise use iam user name --validation Validate kubeconfig by trying to access Mesh with existing config (default true) 父主题: 使用kubectl连接网格控制面
  • 处理查询到的指标 查询指标中查询的指标数据通常有多条,例如组件有多个实例,则指标数据也有多条,或查询了一段时间的指标数据,该段时间内采集多条数据。 伸缩策略中的PromQL必须返回单个值,因此需要处理查询得到的指标数据,以得到单个值,示例如下: 查询最新一条指标,并求平均值,得到所有实例的http请求总数的平均值: avg(http_requests_total{environment_name="my_environment",application_name="my_application",component_name="my_component"}) 查询最近5分钟的所有指标数据,获取变化值(即增长值),并求平均,得到5分钟内平均每个实例的http请求增长数: avg(delta(http_requests_total{environment_name="my_environment",application_name="my_application",component_name="my_component"}[5m])) 更多请参考PromQL官方文档和PromQL官方示例。
  • 错误码说明 当您调用API时,如果遇到“APIGW”开头的错误码,请参见API网关错误码进行处理。 HTTP状态码 返回值 说明 Error Message 处理措施 400 BMS.0001 请求数据错误。 Fail to parse request, reason: %s. 请参考返回的Error Message信息检查请求体。 400 BMS.0002 裸金属服务器还未上线。 The BMS service is unavailable. 服务当前不可用,请选择合适可用的Region。 400 BMS.0003 请求数据错误。 Create BareMetal Server error, request is null. 请参考返回的Error Message信息检查请求体。 400 BMS.0004 权限不足。 Role check fail, reason: %s. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0005 权限不足。 Role check fail, reason: You do not have permission or your balance is insufficient. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0008 规格查询失败。 Fail to query flavor [%s], reason: %s. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0006 创建Job失败。 Fail to operate baremetal server. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0009 规格相关属性查询失败。 Fail to query flavor extra specs[%s], reason: %s. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0010 镜像查询失败。 Fail to query image [%s], reason: %s. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0011 此镜像属性不支持裸金属服务器。 The selected images cannot be used to apply for BMSs, %s. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0012 所选子网中的IP地址数目不足。 The number of IP addresses in the selected subnet[%s] is insufficient. 请检查子网的IP是否已经被使用完。 400 BMS.0013 Port查询失败。 Fail to query ports by subnet [%s], reason: %s. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0014 指定的IP地址冲突。 The specified IP address conflicts with an existing IP address in subnet[%s]. 请修改网卡IP。 400 BMS.0015 网卡查询失败。 Fail to query subnet, reason: %s. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0017 弹性公网IP配额不足。 The number[%d] of EIPs has reached the maximum[%d] allowed. Apply for a higher quota and try again. EIP配额不足,请申请扩大EIP配额。 400 BMS.0218 创建订单失败。 Fail to create order, reason: %s. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0219 修改裸金属服务器名称失败。 OpenStack nova change ServerName fail. 请联系技术支持。 400 BMS.0018 请求参数不合法。 Request parameter is invalid. 请参考返回的Error Message修改请求。 400 BMS.0019 网卡参数不合法。 publicIp parameter is illegal, reason: %s. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0020 计费模式检验异常。 Fail to check chargingMode, reason: %s. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0021 所选规格不能创建裸金属服务器,请重新选择。 Flavor parameter is illegal, reason: %s. 请选择合适的规格。 400 BMS.0022 请求参数不合法。 Request parameter is invalid. 请参考返回的Error Message修改请求。 400 BMS.0023 查询配额失败。 Fail to query limits, reason: %s 请参考返回的Error Message,或者联系技术支持。 400 BMS.0025 裸金属服务器的个数超过配额。 The number of cloud servers has reached the maximum allowed. 请申请扩大配额。 400 BMS.0026 裸金属服务器的CPU个数超过配额。 The number of CPU cores used by all cloud servers has reached the maximum allowed. 请申请扩大配额。 400 BMS.0027 裸金属服务器的内存超过配额。 The memory space used by all cloud servers has reached the maximum allowed. 请申请扩大配额。 400 BMS.0028 裸金属服务器的个数和CPU个数超过配额。 The number of CPU cores used by all cloud servers and that of cloud servers have reached the maximum allowed. 请申请扩大配额。 400 BMS.0029 裸金属服务器的个数和内存超过配额。 The memory space used by all cloud servers and the number of cloud servers have reached the maximum allowed. 请申请扩大配额。 400 BMS.0030 裸金属服务器的内存和CPU个数超过配额。 The memory space and number of CPU cores used by all cloud servers have reached the maximum allowed. 请申请扩大配额。 400 BMS.0031 裸金属服务器的个数、CPU个数和内存超过配额。 The number of cloud servers, the memory space used by all cloud servers, and the number of CPU cores used by all cloud servers have reached the maximum allowed. 请申请扩大配额。 400 BMS.0032 请联系技术支持申请裸金属服务器。 Token check fail. 请参考返回的Error Message,或者联系技术支持。 403 BMS.0033 您暂时没有操作权限,请联系技术支持。 Fail to check roles, reason: %s. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0034 暂时不支持自动化发放裸金属服务器。 Not support create Bare Metal Server. 当前不支持此操作。 400 BMS.0047 系统盘参数异常。 Root volume is illegal, reason: %s. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0049 key_name查询失败。 Query keypair fail, reason is: %s. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0089 tag policy合规性校验不通过。 The tag policy does not allow the specified value for the following tag key: %s. 请检查tag policy策略,或者联系技术支持。 400 BMS.0102 此镜像暂不支持挂载卷。 The image does not support attach volume. 请联系技术支持。 400 BMS.0103 该卷不存在。 Attach volume %s fail, volume info is null. 请核对卷信息是否正确。 400 BMS.0104 数据卷不能挂载在系统盘挂载点上。 Attach volume %s fail, data volume can not attach in root volume device. 请选择其他挂载点。 400 BMS.0105 挂载点不合法。 Attach volume %s fail, device is illegal. 检查挂载点是否合法。 400 BMS.0106 数据卷可用区和裸金属服务器可用区不一致。 Attach volume %s fail, volume's az is not equal with server's az. 请确保数据卷和裸金属服务器的可用区一致。 400 BMS.0108 系统盘和裸金属服务器不匹配。 Attach volume %s fail, root volume does not match the VM, do not change image. 系统盘和裸金属服务器不匹配,请确认后再挂载。 400 BMS.1001 只有当裸金属服务器处于运行中或者关机状态,才能进行此操作。 Volume can only be attached when server %s stopped or active. 请稍候重试或联系技术支持。 400 BMS.1002 裸金属服务器可挂载数据卷数量超过配额。 Attach volume fail, server %s attchment num over limit. 请联系技术支持。 400 BMS.1003 卷状态无效。 Attach shareable volume %s fail, volume status is %s, not available or inuse. 请检查该卷的状态是否为已挂卷状态或其他不可用状态。 400 BMS.1004 裸金属服务器可挂载的共享数据卷数量超过配额。 Attach shareable volume %s fail, volume status is %s, not available or inuse. 请联系技术支持。 400 BMS.1006 暂时无法获取该裸金属服务器的运行状态。 Server %s info is null or its status or its metadata is null. 请稍候重试或联系技术支持。 400 BMS.1007 调用接口失败。 Calling interface failed 请参考返回的Error Message,或者联系技术支持。 400 BMS.1008 卷类型不匹配。 The server[%s] is not HANA server, volume[%s] does not match the server. 请检查卷类型是否匹配,或者联系技术支持。 400 BMS.1009 该数据卷已经挂载在这台裸金属服务器上面。 Attach shareable volume %s fail, volume status is %s, the volume has been attached to the server. 请重新选择数据卷。 400 BMS.1011 该数据卷正在挂载。 Attach shareable volume %s fail, volume status is %s, not available or inuse. 请不要重复操作。 400 BMS.3001 查询Security Group或者Subnet失败。 Query security group failed: %s. or Query vpcId for subnet failed: %s. 请参考返回的Error Message,或者联系技术支持。 400 BMS.3011 系统错误。 Decoded token is null. 请参考返回的Error Message,或者联系技术支持。 400 BMS.3025 云硬盘类型错误。 Not support create shareable data volumes. 请参考返回的Error Message,或者联系技术支持。 400 BMS.3035 此裸金属服务器没有匹配的卷。 Attach volume fail: the bmsid [%s] in volume metadata is not the same with bmsid [%s] in url. 请确保此卷和裸金属服务器匹配,或者联系技术支持。 400 BMS.3039 密码复杂度校验失败。 The password is illegal, reason: %s. 请参考密码规则。 400 BMS.0246 VPC查询失败。 The vpcId[%s] is invalid or not-existing. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0201 创建裸金属服务器参数不正确。 Fail to check the baremetal server params, reason: %s. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0202 数据盘类型不合法。 All volumes must be in same type. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0203 Volume参数不合法。 Volume is illegal, %s. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0204 数据盘超过最大允许值。 The num of datavolume is illegal, the num is %d, max num allow is %d. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0205 裸金属服务器数量不合法。 The number of baremetal servers is out of range for one quest. 请修改创建或者删除裸金属服务器的数量。 400 BMS.0206 名称含有非法字符。 The baremetal server name [%s] is include invalid char. 请按要求修改名称。 400 BMS.0207 批量创建裸金属服务器不允许指定IP。 VPC is illegal, reason: %s. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0208 AZ查询失败。 Fail to get RegionInfo by tenant [%s], reason: %s. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0210 注入数据超过最大长度。 The size of userdata [%d] is over quota limits [%d]. 请修改注入数据。 400 BMS.0211 密钥不合法。 The image platform is [%s], support publicKey, reason: the publicKey is illegal, null is not allowed. 请选择合适的密钥。 400 BMS.0114 卸载卷不在该裸金属服务器的卷列表中。 Volume %s is not in server %s attach volume list. 请确定该卷是否存在。 400 BMS.0212 系统过载。 System is overloaded, please try again later. 请稍后重试。 400 BMS.0213 权限不足。 OBTAZ role verify fail: not allowed role. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0214 网卡查询失败。 Query subnet[%s] failed: response is null. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0215 创建订单失败。 The response of inquiry order info is null or invalid. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0216 提交订单失败。 Submit order[%s] failed: %s. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0217 Metadata校验失败。 Create server fail, reason: metaData is illegal. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0222 主网卡不允许删除。 primary port can not be deleted. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0223 目前只支持S CS I磁盘模式。 Only SCSI disks are supported. 目前只支持SCSI磁盘模式,请选择该模式。 400 BMS.0039 裸金属服务器已经关机。 Server is stopped, not allow to stop. 请勿重复关机。 400 BMS.0040 裸金属服务器不存在。 The server does not exist. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0035 裸金属服务器已经上电,不允许进行其他操作。 Server is powering on, not allow to %s. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0036 裸金属服务器已经下电,不允许进行其他操作。 Server is powering off, not allow to %s. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0038 裸金属服务器正在运行中,不允许启动。 Server is running, not allow to start. 请勿重复开机。 400 BMS.0037 裸金属服务器正在重启,不允许进行其他操作。 Server is rebooting, not allow to %s. 请参考返回的Error Message,或者联系技术支持。 403 BMS.0288 无操作权限。 Policy doesn't allow %s to be performed. 请参考返回的Error Message,或者联系技术支持 400 BMS.0290 该卷不是共享卷,不支持批量挂载。 Batch attach volume type must be sharable. 请选择共享卷。 400 BMS.0291 企业项目ID不能为空。 enterprise_project_id can not be empty. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0294 调用EPS查询项目失败。 Query enterprise_project_id[%s] failed %. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0293 查询项目信息失败。 Query enterprise_project_id[%s] failed: response is null. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0292 企业项目已经停用。 enterprise_project_id[%s] is deactive. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0071 指定EIP创建裸金属服务器时,不能创建新的EIP。 Using an existing EIP and creating a new EIP can't be used at the same time. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0072 不能用一个指定的EIP批量创建多个裸金属服务器。 An existing EIP cannot be assigned to the ECSs created in batches. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0073 带宽参数为空。 Bandwidth info in eip is null. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0074 EIP扩展参数不可用。 Parameter exetendparam or chargingMode is null. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0075 带宽ID为空。 Bandwidth info in eip is null. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0076 EIP计费模式不可用。 Parameter chargingMode only supports postPaid when shared type is whole. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0077 带宽大小不合法。 PublicIp parameter is illegal, reason: %s. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0078 EIP配额不足。 Shared bandwidth has been bound to %d EIPs, quota is %d. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0079 EIP带宽类型不可用。 Specifies the bandwidth of the shared type and the id cannot be empty. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0080 子网状态不可用。 Check subnet status failed. 请检查子网是否存在,或者是否是ACTIVE状态。 400 BMS.0297 云硬盘提交订单且未支付,不允许挂载/卸载。 Fail to attach volume[%s]: volume is locked. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0054 容量校验失败。 Check capacity fail, the number of capacity is: [%d], and req num is: [%d]. 规格容量不足,请联系技术支持。 400 BMS.0055 查询配额失败。 Query capacity fail, Flavor id is [%s], reason: [%s]. 请参考返回的Error Message,或者联系技术支持。 400 BMS.2005 Network查询失败。 Network could not be found. 请检查Network信息,或者联系技术支持。 400 BMS.3037 资源不足或服务器启动失败。 Insufficient resources or failed to start the BMS. 请联系技术支持。 400 BMS.3004 创建失败,系统内部错误。 Failed to create the BMS due to an internal system error. 请联系技术支持。 400 BMS.3005 创建端口失败。 Failed to create the port. 请联系技术支持。 400 BMS.3033 创建系统卷失败。 Failed to create the system disk. 请联系技术支持。 400 BMS.3029 创建系统卷失败,系统卷状态异常。 Failed to create the system disk. The disk status is abnormal. 请联系技术支持。 400 BMS.3006 创建弹性IP失败。 Failed to assign the floating IP address. 请联系技术支持。 400 BMS.3021 创建数据卷失败。 Failed to create the data disk. 请联系技术支持。 400 BMS.3019 挂载数据卷失败。 Failed to attach the data disk. 请联系技术支持。 400 BMS.3038 创建弹性公网IP失败。 Failed to assign the EIP. 请联系技术支持。 400 BMS.0315 该规格不支持挂卷。 Disks cannot be attached to a BMS using this flavor[%s]. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0316 该RAID Level和RAID类型不匹配。 RAID level and RAID type do not match. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0317 磁盘信息不合法,磁盘信息为空。 Disk information is empty. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0320 此规格不支持该类型的卷组RAID。 This flavor does not support RAID formed by disks of this type. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0321 此规格不支持该大小的卷组RAID。 This flavor does not support RAID formed by disks of this size. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0322 磁盘数量和该RAID Level不匹配。 Disk quantity and RAID level do not match. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0323 磁盘数量和规格中对应的磁盘数量不匹配。 Disk quantity does not match that in the flavor. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0325 磁盘数量超过该规格支持的盘数量。 Disk quantity exceeds that supported by the flavor. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0327 仅支持JBOD。 Only JBOD is supported. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0328 仅支持单盘RAID 0。 Only single-disk RAID 0 is supported. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0329 磁盘信息不合法,磁盘类型为空。 Disk type is empty. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0330 不支持组RAID。 RAID is not supported. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0331 没有IPv6公测权限。 No IPv6 Open Beta Test permissions. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0333 不支持IPv6。 IPv6 is not supported. 请参考返回的Error Message,或者联系技术支持。 400 BMS.0400 镜像不支持IPv6。 the image[%s] is not support IPv6. 请参考返回的Error Message,或者联系技术支持 400 BMS.0360 磁盘已经冻结,无法操作裸金属服务器。 This operation cannot be performed because EVS Disk %s is frozen. 请参考返回的Error Message,或者联系技术支持。 400 BMS.3026 密码不符合规则要求。 Password does not meet the requirements of the rule. 请参考返回的Error Message,或者联系技术支持。 400 BMS.3027 VPC参数不合法。 VPC parameter is illegal. 请参考返回的Error Message,或者联系技术支持。 400 BMS.3028 卷配额异常。 cinder quota check fail. 请参考返回的Error Message,或者联系技术支持。 400 Common.0018 token无效,token中的tenant_id和URL中的tenant_id不一致 tenantId in token is not the same with in URL. 请检查租户的token是否正确。 400 BMS.0111 密码或密钥未指定或者重复指定。 none or multiple passwords specified, please specify one. 密码或者密钥不能同时指定,请确认登录方式。 400 BMS.0395 Windows系统的裸金属服务器不支持远程登录。 The server[%s] is windows system and can not support remote login。 请参考返回的Error Message,或者联系技术支持。 400 BMS.0605 当前裸机被锁定。 the BMS is locked. 请参考返回的Error Message,或者联系技术支持。
  • 编辑构建任务 登录编译构建服务首页。 在编译构建任务列表搜索目标任务。 单击编译构建任务所在行,在下拉列表中选择“编辑”,进入“编辑任务”页面。 基本信息:可修改任务名称、源码源、源码仓库、分支、任务描述等信息。 构建步骤:可修改构建步骤、步骤参数等信息。 参数设置:可配置执行任务时的自定义参数。 执行计划:可配置触发事件(持续集成)和定时执行。 修改历史:可查看构建任务的修改记录。 权限管理:可配置不同角色的权限。 通知:可配置任务事件类型通知信息(包括任务构建成功、失败、删除、配置更新、被禁用)。 根据需要选择对应页签并进行编辑,单击“保存”完成修改。
  • 代码化构建 (代码化构建仅支持源码源为Repo。) 编译构建支持通过yaml文件配置构建脚本,用户可以将构建过程需要用到的构建环境、构建参数、构建命令、构建步骤等操作通过YAML语法编写成build.yml文件,并且将build.yml文件随着被构建的代码一起纳入代码仓库,执行构建任务时,系统会以build.yml文件作为构建脚本执行构建任务,使构建过程可追溯、可还原,安全可信。功能优势如下: 清晰描述构建过程:构建参数、构建命令、构建步骤、以及构建后的操作,使构建过程可信。 每次构建使用对应当前commit的build.yml配置,保证构建可还原可追溯,不必担心因修改了构建配置而不能重复执行之前的任务。 如果新特性需要修改构建脚本,开发人员可以拉一个新的分支修改build.yml去测试,而不用担心影响其他分支。 代码化构建支持单任务配置和多任务配置。
  • 按需计费项 需求管理服务的计费项为用户数和存储空间。 用户数,即用于计费计量的用户数,是该租户下加入项目的去重用户数,也包括从其他租户邀请加入到本租户项目的用户数。 如果该租户下的某个用户加入该租户下的多个项目,也只作为一个用户数计费。 例如:有A、B两个项目,A项目10人,B项目5人,A、B项目里的人是重叠的,B项目的5个用户也在A项目,A、B项目一起实际收费是按10人收。 如果该租户下的某个用户没有加入该租户下的任何一个项目,则不参与计费。 如果该租户下的某个项目邀请了其他租户的用户加入,则这批用户也作为邀请租户的用户进行计费。 这批用户同时也会按自己归属租户的计费原则进行计费。 存储空间,即用于计费计量的存储空间,是按这个租户所有消耗的存储空间进行计量计费,并不区分项目。 存储空间主要来自于用户使用文档托管服务的存储空间消耗,包括直接上传托管到文档管理服务的文档,也包括作为工作项附件的文档。 开通服务前,提供5用户+500MB存储空间内 免费体验 。 当需要加入第6个人时,系统提示开通服务。 开通服务后,即通过管理控制台开通需求管理服务后, 此时免费额度失效,将按实际用量计费,前面5个人和存储空间500MB开始计费。 例如:项目中在免费额度(5个人)基础上再加入1个人,则此时需求管理服务的用户数共有6(即5+1)人,计费也按照6个人计费。 当前用户数和存储空间按小时计量和计费。 表1 服务计费标准 计费因子 价格 价格单位 用户数*时间 0.08 元/用户/小时 存储空间*时间 0.000442 元/GB/小时
  • 操作步骤 通过使用kubectl连接网格控制面获取kubeconofig的证书内容。 登录云容器引擎控制面,单击选择任意集群,进入详情页。 建议选择网格对应的VPC下的集群。若连接其他VPC下的集群,则需要参考UCS服务网格 集群连通方法打通集群所在VPC和网格对应VPC。 在左侧导航栏,单击“配置项与密钥”,单击“密钥”页签,显示集群的密钥信息。 选择“命名空间”为“asm-system”,单击右上角“创建密钥”。 设置密钥参数,单击右下角“创建密钥”,完成密钥创建。 名称:自定义名称。例如:kubeconfig。 创建的密钥的名称不要使用mesh-kubeconfig,因为apiserver也会自动创建这个名字的密钥,如果使用了这个名称可能会被覆盖。 描述:(可选)。 密钥类型:选择“其他”,填写密钥类型为“cfe/secure-opaque”。 密钥数据:添加密钥数据,键为“kubeconfig”,值为1中获取到的kubeconfig证书内容。 单击左侧导航栏“插件与模板”,在“可安装插件”页签中找到“asm-service-controller”插件,单击“安装”。 填写配置参数,单击右下角“安装”,完成插件安装。 meshKubeconfigSecret:为步骤5中创建的密钥名称。 source:目前包含“nacos”,代表对接的第三方注册中心nacos的相关信息,其中包含4个参数。 name:为该注册中心名称。 addr:为nacos的ip及端口。 allnamespaces:为是否需要同步nacos全部命名空间中的服务,当allnamespaces为false时,需要填充namespaces,表示需要同步的nacos的命名空间。 namespaces:表示需要同步的nacos的命名空间。 若插件运行的集群为CCE turbo类型集群,在安装插件完成后,需要参考为Pod配置EIP为asm-system命名空间下,名为asm-service-controller的pod绑定eip,才能正常使用该插件功能。
  • 接入前准备 服务 域名 IP(如涉及) 端口 SWR swr.cn-north-4.myhuaweicloud.com 从VPCEP中获取。 443 OBS op-svc-swr-b051-10-38-19-62-3az.obs.cn-north-4.myhuaweicloud.com 不涉及 443、80 CIA cie-{容器智能分析实例instanceid前八位数字}{当前选择接入的VPC子网ID前八位数字}.cn-north-4.myhuaweicloud.com 从VPCEP中获取。 443 DNS 不涉及 创建VPCEP,选择DNS Endpoint对应的地址。 53 其他区域的SWR及依赖OBS的域名信息 Region SWR域名 OBS域名 华北-北京四 swr.cn-north-4.myhuaweicloud.com op-svc-swr-b051-10-38-19-62-3az.obs.cn-north-4.myhuaweicloud.com 华东-上海二 swr.cn-east-2.myhuaweicloud.com obs.cn-east-2.myhuaweicloud.com 华东-上海一 swr.cn-east-3.myhuaweicloud.com op-svc-swr-b051-10-147-7-14-3az.obs.cn-east-3.myhuaweicloud.com 华南-广州 swr.cn-south-1.myhuaweicloud.com op-svc-swr-b051-10-230-33-197-3az.obs.cn-south-1.myhuaweicloud.com 西南-贵阳一 swr.cn-southwest-2.myhuaweicloud.com op-svc-swr-b051-10-205-14-19-3az.obs.cn-southwest-2.myhuaweicloud.com 华北-乌兰察布一 swr.cn-north-9.myhuaweicloud.com obs.cn-north-9.myhuaweicloud.com 亚太-新加坡 swr.ap-southeast-3.myhuaweicloud.com op-svc-swr-b051-10-38-34-172-3az.obs.ap-southeast-3.myhuaweicloud.com 香港 swr.ap-southeast-1.myhuaweicloud.com obs.ap-southeast-1.myhuaweicloud.com 拉美-墨西哥一 swr.na-mexico-1.myhuaweicloud.com obs.na-mexico-1.myhuaweicloud.com 拉美-墨西哥二 swr.la-north-2.myhuaweicloud.com obs.la-north-2.myhuaweicloud.com
  • VPC网段之间的网络连通 登录云容器引擎控制台,选择本端集群,进入集群详情页,单击左侧导航栏“节点管理”,进入节点详情页。 单击“节点名称”下的节点,在弹出的页面中单击右上角“远程登录”,选择VNC方式登录。 根据界面提示,输入账号和密码,成功进入Linux环境中。 在云容器引擎控制台中,选择对端集群,进入集群详情页,单击左侧导航栏“节点管理”,进入节点详情页。 在3中,使用Linux命令查看网络是否连通。对端集群节点IP为4中的节点IP。例如:ping 172.17.0.2。 在对端集群中执行相同的操作。
  • 获取IAM Token 创建 ServiceAccount,此处 ServiceAccount 的名称需要与2时填写的 ServiceAccountName 保持一致。 apiVersion: v1 kind: ServiceAccount metadata: name: test_sa_name # 与配置身份转换规则处保持一致 如下所示,在工作负载中新增 ServiceAccount 以及 Volume 相关配置。 apiVersion: apps/v1 kind: Deployment metadata: name: nginx spec: replicas: 1 selector: matchLabels: app: nginx version: v1 template: metadata: labels: app: nginx version: v1 spec: containers: - name: container-1 image: nginx:latest volumeMounts - mountPath: "/var/run/secrets/tokens" # 将Kubernetes生成的ServiceAccountToken 挂载到 /var/run/secrets/tokens/token_path 文件内 name: token-volume imagePullSecrets: - name: default-secret serviceAccountName: test_sa_name # 上一步创建的ServiceAccount的名称 volumes: - name: token-volume projected: defaultMode: 420 sources: - serviceAccountToken: audience: ucs-cluster-identity # 此处取值必须为身份提供商的客户端ID expirationSeconds: 7200 # 过期时间 path: token_path # 路径名称,可自定义 创建完成后,登录到容器中获取 Token。 构造请求体数据,项目ID的获取请参见获取项目ID。 { "auth" : { "id_token" : { "id" : "eyJhbGciOiJSUzIXXXXX" // 上一步获得的 token 内容 }, "scope": { "project" : { "id" : "05495693df80d3c92fa1c01795c2be02", // 项目 ID "name" : "cn-north-7" } } } } 请求IAM接口以获取IAM Token,IAM的Endpoint信息请参见地区和终端节点。 curl -i --location --request POST 'https://{{iam endpoint}}/v3.0/OS-AUTH/id-token/tokens' --header 'X-Idp-Id: {{workload_identity}}' --header 'Content-Type: application/json' --data @token_body.json workload_identity为1中注册的身份提供商名称,此示例内为 ucs-cluster-identity。 token_body.json 为构造的请求体数据文件。 返回体内获取IAM Token,响应消息头中 X-Subject-Token 字段即为 IAM Token。
  • 使用IAM Token访问云服务 本小节以请求LTS服务为例,介绍如何使用IAM Token访问云服务。 在使用IAM Token访问云服务前,应为用户组配置相应服务的权限。 请求LTS服务需要在用户组中加上 LTS FullAccess 权限,如图所示 执行如下命令,调用对应服务接口。 curl --location --request GET 'https://ltsperform.cn-north-7.myhuaweicloud.com/v2/{{项目 ID}}/groups/{{日志组 ID}}/streams' \--header 'Content-Type: application/json;charset=utf-8' \--header 'X-Auth-Token: {{上一步获得的 IAM token}}' \--data-raw '' 日志组ID可在LTS服务内进行查询。 期望的返回结果如图所示
  • 获取本地集群私钥签发的jwks 使用kubectl连接本地集群。 执行如下命令获取公钥。 kubectl get --raw /openid/v1/jwks 返回结果为一个 json 字符串,是当前集群的签名公钥,用于访问身份提供商。 { "keys": [ { "kty": "RSA", "e": "AQAB", "use": "sig", "kid": "Ew29q....", "alg": "RS256", "n": "peJdm...." } ] }
  • 配置身份提供商 登录IAM控制台,创建身份提供商,协议选择OpenID Connect。 图2 创建身份提供商 单击“确定”,然后修改身份提供商信息,需要修改的信息如表1。若需要创建身份转换规则,单击“创建规则”进行创建。 图3 修改身份提供商信息 图4 创建身份转换规则 表1 身份提供商配置参数说明 参数 说明 访问方式 选择“编程访问” 配置信息 身份提供商 URL:https://kubernetes.default.svc.cluster.local。 客户端 ID:ucs-cluster-identity。 签名公钥:本地集群的jwks,获取方法请参见获取本地集群私钥签发的jwks。 身份转换规则 身份映射规则是将工作负载的 ServiceAccount 和 IAM 用户组做映射。 例如:在集群default命名空间下创建一个名为 XXX 的 ServiceAccount,映射到 demo 用户组(后续使用身份提供商 ID 访问云服务就具有 demo 用户组的权限)。 值的格式为:system:serviceaccount:Namespace:ServiceAccountName 单击“确定”。
  • 使用流程 使用工作负载Identity的流程如图1,具体流程如下: 前置授权。 在UCS获取本地集群私钥签发的jwks,该公钥用于验证集群签发的ServiceAccount Token。 在 IAM 配置身份供应商,标志当前集群在IAM侧的身份。 为身份提供商配置集群签发的公钥,后续负载使用Token发送请求时,IAM使用该公钥验证Token。 添加 ServiceAccount 与 IAM 账号的映射规则,配置后,当前 ServiceAccount 拥有对应用户的 IAM 权限。 工作负载配置Token。 部署应用并配置ServiceAccount。 挂载对应ServiceAccount的Token。 验证获取的Token能否正常进行访问。 访问IAM接口获取IAM Token。 使用IAMToken 访问云服务。 图1 使用工作负载Identity流程
  • 概述 欢迎使用云日志服务(Log Tank Service,简称LTS)。LTS用于收集来自主机和云服务的日志数据,通过海量日志数据的分析与处理,可以将云服务和应用程序的可用性和性能最大化,为您提供一个实时、高效、安全的日志处理能力,帮助您快速高效地进行实时决策分析、设备运维管理、用户业务趋势分析等。 云日志服务所提供的接口为扩展接口。通过使用云日志服务所提供的接口,您可以完整的使用云日志服务的基本功能。例如查询API版本号、创建,删除日志组和日志流。 父主题: 使用前必读
  • 请求示例 查询主机组信息,根据传入的Body体进行过滤。若是body体中无过滤参数,则查询全量数据。 POST https://{endpoint}/v3/{project_id}/lts/host-group-list { "host_group_id_list" : [ "bca6d903-3528-42a8-91f4-586722cxxxxx" ], "filter" : { "host_group_type" : "lixxx", "host_group_name_list" : [ "wjyTxxx", "xxxest" ], "host_name_list" : [ "ecs-apmtexxx删" ], "host_group_tag" : { "tag_type" : "AND", "tag_list" : [ { "key" : "xxx", "value" : "xxx" } ] } } }
  • 响应示例 状态码: 200 查询主机组列表请求响应成功 { "result" : [ { "host_group_id" : "598c77aa-c69b-42f0-8cb8-xxxx5b38", "host_group_name" : "devspoxxxou1", "host_group_type" : "lxxux", "host_id_list" : [ "dc1dab7e-b04xxxx", "xxxxx" ], "host_group_tag" : [ { "key" : "xxx", "value" : "xxx" }, { "key" : "xxx", "value" : "xxx" } ], "create_time" : 1635459410332, "update_time" : 163560332 } ], "total" : 1 } 状态码: 400 非法请求 建议根据error_msg直接修改该请求。 { "error_code" : "LTS.1807", "error_msg" : "Invalid host group id" } 状态码: 500 表明服务端能被请求访问到,但是服务内部出错。 { "error_code" : "LTS.0010", "error_msg" : "Internal Server Error" }
  • 响应参数 状态码: 200 表7 响应Body参数 参数 参数类型 描述 result Array of GetHostGroupInfo objects 主机组列表 total Long 主机组信息总数量 最小值:0 最大值:1000 表8 GetHostGroupInfo 参数 参数类型 描述 host_group_id String 主机组ID 最小长度:36 最大长度:36 host_group_name String 主机组名称 最小长度:1 最大长度:64 host_group_type String 主机组类型。linux:linux类型,windows:windows类型 枚举值: linux windows host_id_list Array of strings 主机ID列表 最小长度:36 最大长度:36 host_group_tag Array of HostGroupTagResBody objects 标签信息. create_time Long 创建时间 最小值:0 最大值:9999999999999 update_time Long 更新时间 最小值:0 最大值:9999999999999 表9 HostGroupTagResBody 参数 参数类型 描述 key String 标签Key 最小长度:1 最大长度:36 value String 标签Value 最小长度:1 最大长度:36 状态码: 400 表10 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:8 error_msg String 错误描述 最小长度:1 最大长度:1000 状态码: 500 表11 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:8 error_msg String 错误描述 最小长度:1 最大长度:1000
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 从IAM服务获取的用户Token,获取方式请参见:获取用户Token 最小长度:1 最大长度:10000 Content-Type 是 String 该字段填为:application/json;charset=UTF-8。 最小长度:30 最大长度:30 表3 请求Body参数 参数 是否必选 参数类型 描述 host_group_id_list 否 Array of strings 主机组ID 最小长度:36 最大长度:36 filter 是 GetHostGroupListFilter object 主机组过滤参数 表4 GetHostGroupListFilter 参数 是否必选 参数类型 描述 host_group_type 否 String 主机组类型。windows:windows类型,linux:linux类型 枚举值: windows linux host_group_name_list 否 Array of strings 主机组名称列表。 最小长度:1 最大长度:64 host_name_list 否 Array of strings 主机名称列表。 最小长度:1 最大长度:128 host_group_tag 否 GetHostGroupListTag object 主机组标签信息 表5 GetHostGroupListTag 参数 是否必选 参数类型 描述 tag_type 否 String 标签类型。AND:标签过滤的逻辑为与,OR:标签过滤的逻辑为或 枚举值: AND OR tag_list 否 Array of HostGroupTag objects 主机组标签 表6 HostGroupTag 参数 是否必选 参数类型 描述 key 否 String 标签Key 最小长度:1 最大长度:128 value 否 String 标签Value 最小长度:0 最大长度:255
  • 请求示例 修改日志接入(ECS) PUT https://{endpoint}/v3/{project_id}/lts/access-config { "access_config_id" : "ed90802a-8475-4702-955e-e3ee16a5dde9", "access_config_detail" : { "paths" : [ "/test/222", "/test/111" ], "black_paths" : [ ], "format" : { "multi" : { "mode" : "regular", "value" : "aaaa" } }, "windows_log_info" : { "categorys" : [ "Application", "System" ], "time_offset" : { "offset" : 7, "unit" : "day" }, "event_level" : [ "information", "warning", "error", "critical", "verbose" ] } }, "host_group_info" : { "host_group_id_list" : [ "de4dbed4-a3bc-4877-a7ee-096a2a63e036" ] }, "access_config_tag" : [ { "key" : "xxx", "value" : "xxx" }, { "key" : "xxx1", "value" : "xxx1" } ] }
  • 响应示例 状态码: 200 修改日志接入请求响应成功 { "access_config_detail" : { "black_paths" : [ "/wjy/hei/tesxxx", "/wjy/hei/tesxxx" ], "format" : { "single" : { "mode" : "wildcard", "value" : "1111" } }, "paths" : [ "/wjy/tesxxx" ], "windows_log_info" : { "categorys" : [ "System", "Application", "Security", "Setup" ], "event_level" : [ "information", "warning", "error", "critical", "verbose" ], "time_offset" : { "offset" : 168, "unit" : "hour" } } }, "access_config_id" : "aa58d29e-21a9-4761-ba16-8cxxxxd", "access_config_name" : "采集Wjy_xxxxt2", "access_config_tag" : [ { "key" : "xxx", "value" : "xxx" }, { "key" : "xxx1", "value" : "xxx1" } ], "access_config_type" : "AGENT", "create_time" : 163504332654, "host_group_info" : { "host_group_id_list" : [ "de4dbed4-a3bc-4877-a7ee-09xxxxxx" ] }, "log_info" : { "log_group_id" : "9a7e2183-2d6d-4732-9axxxxx49e0", "log_group_name" : "lts-groupxxxa", "log_stream_id" : "c4de0538-53e6-41fd-b951-xxxx8d7", "log_stream_name" : "lts-topixxx" } } 状态码: 400 非法请求 建议根据error_msg直接修改该请求。 { "error_code" : "LTS.1807", "error_msg" : "Invalid access config id" } 状态码: 500 表明服务端能被请求访问到,但是服务内部出错。 { "error_code" : "LTS.0010", "error_msg" : "The system encountered an internal error" }
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 [数组元素] Array of CreateAomMappingRuleResp objects 请求响应成功, 成功获取单个接入配置。 表4 CreateAomMappingRuleResp 参数 参数类型 描述 project_id String 项目id rule_name String 接入规则名称 rule_id String 接入规则id rule_info AomMappingRuleInfoRespBody object 接入规则详情 表5 AomMappingRuleInfoRespBody 参数 参数类型 描述 cluster_id String 集群id cluster_name String 集群名称 deployments_prefix String 日志流前缀 deployments Array of strings 工作负载 namespace String 命名空间 container_name String 容器名称 files Array of AomMappingfilesInfos objects 接入规则详情 表6 AomMappingfilesInfos 参数 参数类型 描述 file_name String 路径名 log_stream_info AomMappingLogStreamInfos object 接入规则详情。 表7 AomMappingLogStreamInfos 参数 参数类型 描述 target_log_group_id String 日志组id target_log_group_name String 目标日志组名称 target_log_stream_id String 日志流id target_log_stream_name String 目标日志流名称 状态码: 400 表8 响应Body参数 参数 参数类型 描述 code String 错误码。 枚举值: LTS.0014 details String 调用失败响应信息描述。 枚举值: Operation DB failed 状态码: 401 表9 响应Body参数 参数 参数类型 描述 massage Massage401 object 接口调用信息。 表10 Massage401 参数 参数类型 描述 code String 错误码。 枚举值: LTS.0001 details String 调用失败响应信息描述。 枚举值: project verify error 状态码: 403 表11 响应Body参数 参数 参数类型 描述 error_code String 错误码。 枚举值: LTS.0403 error_msg String 调用失败响应信息描述。 枚举值: Invalid projectId 状态码: 500 表12 响应Body参数 参数 参数类型 描述 error_code String 错误码。 枚举值: LTS.0403 error_msg String 调用失败响应信息描述。 枚举值: Invalid projectId
  • 响应示例 状态码: 200 请求响应成功, 成功获取单个接入配置。 { "project_id" : "", "rule_id" : "", "rule_info" : { "cluster_id" : "", "cluster_name" : "", "container_name" : "", "deployments" : [ "" ], "files" : [ { "file_name" : "", "log_stream_info" : { "target_log_group_id" : "", "target_log_group_name" : "", "target_log_stream_id" : "", "target_log_stream_name" : "" } } ], "namespace" : "" }, "rule_name" : "" } 状态码: 400 BadRequest。非法请求。 建议根据error_msg直接修改该请求,不要重试该请求。 { "errorCode" : "LTS.0014", "errorMessage" : "Operation DB failed" } 状态码: 401 AuthFailed。鉴权失败, 请确认token后再次请求 。 { "error_code" : "LTS.0414", "error_msg" : "Invalid token" } 状态码: 403 Forbidden。请求被拒绝访问。返回该状态码,表明请求能够到达服务端,且服务端能够理解用户请求,但是拒绝做更多的事情,因为该请求被设置为拒绝访问,建议直接修改该请求,不要重试该请求。 { "error_code" : "LTS.0003", "error_msg" : "parse_token_failed" } 状态码: 500 InternalServerError。 表明服务端能被请求访问到,但是服务内部出错。 { "error_code" : "LTS.0102", "error_msg" : "ServiceUnavailable." }
  • 状态码 状态码 描述 200 请求响应成功, 成功获取单个接入配置。 400 BadRequest。非法请求。 建议根据error_msg直接修改该请求,不要重试该请求。 401 AuthFailed。鉴权失败, 请确认token后再次请求 。 403 Forbidden。请求被拒绝访问。返回该状态码,表明请求能够到达服务端,且服务端能够理解用户请求,但是拒绝做更多的事情,因为该请求被设置为拒绝访问,建议直接修改该请求,不要重试该请求。 500 InternalServerError。 表明服务端能被请求访问到,但是服务内部出错。 503 ServiceUnavailable。 被请求的服务无效, 服务不可用。
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 从IAM服务获取的用户Token,获取方式请参见:获取用户Token 缺省值:None 最小长度:1000 最大长度:2000 Content-Type 是 String 该字段填为:application/json;charset=UTF-8。 缺省值:None 最小长度:30 最大长度:30
  • URI GET /v2/{project_id}/lts/aom-mapping/{rule_id} 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID,账号ID,日志组ID、日志流ID,获取方式请参见:获取项目ID,获取账号ID,日志组ID、日志流ID 缺省值:None 最小长度:32 最大长度:32 rule_id 是 String 接入规则ID。 缺省值:None 最小长度:36 最大长度:36
  • 响应示例 状态码: 201 请求响应成功, 成功创建接入配置。 [ { "project_id" : "", "rule_id" : "", "rule_info" : { "cluster_id" : "", "cluster_name" : "", "container_name" : "", "deployments_prefix" : "deployments_prefix", "deployments" : [ "" ], "files" : [ { "file_name" : "", "log_stream_info" : { "target_log_group_id" : "", "target_log_group_name" : "", "target_log_stream_id" : "", "target_log_stream_name" : "" } } ], "namespace" : "" }, "rule_name" : "" } ] 状态码: 400 BadRequest。非法请求。 建议根据error_msg直接修改该请求,不要重试该请求。 { "errorCode" : "LTS.0014", "errorMessage" : "Operation DB failed" } 状态码: 401 AuthFailed。鉴权失败, 请确认token后再次请求 。 { "error_code" : "LTS.0414", "error_msg" : "Invalid token" } 状态码: 403 Forbidden。请求被拒绝访问。返回该状态码,表明请求能够到达服务端,且服务端能够理解用户请求,但是拒绝做更多的事情,因为该请求被设置为拒绝访问,建议直接修改该请求,不要重试该请求。 { "error_code" : "LTS.0003", "error_msg" : "parse_token_failed" } 状态码: 500 InternalServerError。 表明服务端能被请求访问到,但是服务内部出错。 { "error_code" : "LTS.0102", "error_msg" : "ServiceUnavailable." }
  • 请求示例 创建接入规则 POST https://{endpoint}/v2/{project_id}/lts/aom-mapping { "rule_name" : "abcde", "project_id" : "2a473356cca5487f8373be891bffc1cf", "rule_info" : { "cluster_id" : "4fae3587-0202-11eb-9ba9-0255ac100b02", "cluster_name" : "testdiskrate", "deployments_prefix" : "deployments_prefix", "deployments" : [ "__ALL_DEPLOYMENTS__" ], "namespace" : "default", "container_name" : "container-0", "files" : [ { "file_name" : "__ALL_FILES__", "log_stream_info" : { "target_log_group_id" : "8c9dcda6-d048-43a7-989b-c76c34b0ac85", "target_log_group_name" : "lts-group-wb28", "target_log_stream_id" : "2c228bd1-cbf1-41fb-b563-0ca2769202b2", "target_log_stream_name" : "mysql" } } ] } }
  • 状态码 状态码 描述 201 请求响应成功, 成功创建接入配置。 400 BadRequest。非法请求。 建议根据error_msg直接修改该请求,不要重试该请求。 401 AuthFailed。鉴权失败, 请确认token后再次请求 。 403 Forbidden。请求被拒绝访问。返回该状态码,表明请求能够到达服务端,且服务端能够理解用户请求,但是拒绝做更多的事情,因为该请求被设置为拒绝访问,建议直接修改该请求,不要重试该请求。 500 InternalServerError。 表明服务端能被请求访问到,但是服务内部出错。 503 ServiceUnavailable。 被请求的服务无效,服务不可用。
共100000条