本文目录一览:
1、文件上传问题。PHP些的云存储服务器,调用平台接口上传文件(例如阿里云等)。2、阿里云调用 API 服务后返回什么结果3、如何在“阿里云+Wdcp”上面搭建 Python 环境4、各位大神,Python怎么调用阿里云API5、Python的for循环中,遇到错误后,怎么再按照原来的设置重新运行一遍?6、python调用阿里云api导出到excel文件上传问题。PHP些的云存储服务器,调用平台接口上传文件(例如阿里云等)。
文件上传到自己的服务器 会在tmp目录唯磨岩下有缓存的 然后再上传到阿里云,不是直接从客户端上传到阿指御里云的。阿里云的sdk里面游喊应该会有清晰的注释。
阿里云调用 API 服务后返回什么结果
返回结果
调用 API 服务后返回数据采用统一格式,返回的 HTTP 状态码为 2xx,代表调用成功;返回 4xx 或 5xx 的 HTTP 状态码代表调用失败。调用成功返回的数据格式主搜薯要有 XML 和 JSON 两种,外部系统可以在请求时传入参数来制定返回的数据格式,默认为 XML 格式。本文档中的返回示例为了便于用户查看,做了格式化处理,实际返回结果是没有进行换行、缩进等处理的。
成功结果:
错误结果
调用接口出错后,将不会返回结果数据。调用方可根据每个接口对应的错误码以及下述 2.3.3 的公共错误码来定位错误原因。当调用出错时,HTTP 请求返回一个 4xx 或 5xx 的 HTTP 状态码。返回的消息体中是具体的错误代码及错误信息。另外还包含一个全局***的请求 ID:RequestId 和一个您该次请求访问的站点 ID:HostId。在调用方找不到错误原因时,可以联系阿里云客服,并提供该 HostId 和 RequestId,以便稿漏拦我们尽快帮您解决问题。
公共错误码
错误代码
描述
Http 状态码
语义
MissingParameter The input parameter “Action” that is mandatory for processing this request is not supplied 400 缺少 Action 字段
MissingParameter The input parameter “AccessKeyId” that is mandatory for processing this request is not supplied 400 缺少 AccessKeyId 字段
MissingParameter An input parameter “Signature” that is mandatory for processing the request is not supplied. 400 缺少 Signature 字段
MissingParameter The input parameter “TimeStamp” that is mandatory for processing this request is not supplied 400 缺少 Timestamp 字段
MissingParameter The input parameter “Version” that is mandatory for processing this request is not supplied 400 缺少 Version 字段
InvalidParameter The specified parameter “Action or Version” is not valid. 400 键胡 无效的 Action 值(该 API 不存在)
InvalidAccessKeyId.NotFound The Access Key ID provided does not exist in our records. 400 无效的 AccessKeyId 值(该 key 不存在)
Forbidden.AccessKeyDisabled The Access Key is disabled. 403 该 AccessKey 处于禁用状态
IncompleteSignature The request signature does not conform to Aliyun standards. 400 无效的 Signature 取值(签名结果错误)
InvalidParamater The specified parameter “SignatureMethod” is not valid. 400 无效的 SignatureMethod 取值
InvalidParamater The specified parameter “SignatureVersion” is not valid. 400 无效的 SignatureVersion 取值
IllegalTimestamp The input parameter “Timestamp” that is mandatory for processing this request is not supplied. 400 无效的 Timestamp 取值(Timestamp 与服务器时间相差超过了 1 个小时)
SignatureNonceUsed The request signature nonce has been used. 400 无效的 SignatureNonce(该 SignatureNonce 值已被使用过)
InvalidParameter The specified parameter “Action or Version” is not valid. 400 无效的 Version 取值
InvalidOwnerId The specified OwnerId is not valid. 400 无效的 OwnerId 取值
InvalidOwnerAccount The specified OwnerAccount is not valid. 400 无效的 OwnerAccount 取值
InvalidOwner OwnerId and OwnerAccount can’t be used at one API access. 400 同时使用了 OwnerId 和 OwnerAccount
Throttling Request was denied due to request throttling. 400 因系统流控拒绝访问
Throttling Request was denied due to request throttling. 400 该 key 的调用 quota 已用完
InvalidAction Specified action is not valid. 403 该 key 无权调用该 API
UnsupportedHTTPMethod This http method is not supported. 403 用户使用了不支持的 Http Method(当前 TOP 只支持 post 和 get)
ServiceUnavailable The request has failed due to a temporary failure of the server. 500 服务不可用
UnsupportedParameter The parameter ”” is not supported. 400 使用了无效的参数
InternalError The request processing has failed due to some unknown error, exception or failure. 500 其他情况
MissingParameter The input parameter OwnerId,OwnerAccount that is mandatory for processing this request is not supplied. 403 调用该接口没有指定 OwnerId
Forbidden.SubUser The specified action is not available for you。 403 无权调用订单类接口
UnsupportedParameter The parameter ”” is not supported. 400 该参数无权使用
Forbidden.InstanceNotFound The specified Instance is not found, so we cann’t get enough information to check permission in RAM. 404 使用了 RAM 授权子账号进行资源访问,但是本次访问涉及到的 Instance 不存在
Forbidden.DiskNotFound The specified Disk is not found, so we cann’t get enough information to check permission in RAM. 404 使用了 RAM 授权子账号进行资源访问,但是本次访问涉及到的 Disk 不存在
Forbidden.SecurityGroupNotFound The specified SecurityGroup is not found, so we cann’t get enough information to check permission in RAM. 404 使用了 RAM 授权子账号进行资源访问,但是本次访问涉及到的 SecurityGroup 不存在
Forbidden.SnapshotNotFound The specified Snapshot is not found, so we cann’t get enough information to check permission in RAM. 404 使用了 RAM 授权子账号进行资源访问,但是本次访问涉及到的 Snapshot 不存在
Forbidden.ImageNotFound The specified Image is not found, so we cann’t get enough information to check permission in RAM. 404 使用了 RAM 授权子账号进行资源访问,但是本次访问涉及到的 Image 不存在
Forbidden.RAM User not authorized to operate the specified resource, or this API doesn’t support RAM. 403 使用了 RAM 授权子账号进行资源访问,但是本次操作没有被正确的授权
Forbidden.NotSupportRAM This action does not support accessed by RAM mode. 403 该接口不允许使用 RAM 方式进行访问
InsufficientBalance Your account does not have enough balance. 400 余额不足
IdempotentParameterMismatch Request uses a client token in a previous request but is not identical to that request. 400 使用了一个已经使用过的 ClientToken,但此次请求内容却又与上一次使用该 Token 的 request 不一样.
RealNameAuthenticationError Your account has not passed the real-name authentication yet. 403 用户未进行实名认证
InvalidIdempotenceParameter.Mismatch The specified parameters are different from before 403 幂等参数不匹配
LastTokenProcessing The last token request is processing 403 上一次请求还在处理中
InvalidParameter The specified parameter is not valid 400 参数校验失败
如何在“阿里云+Wdcp”上面搭建 Python 环境
阿里云购买数据盘成功后,使用ssh软件连接到服务后
停止wcdcp相关服务
#service httpd stop
#service mysql stop
#service pureftpd stop
#serive nginxd stop
#service wdapache stop
格式化新的数据盘,注意不要格式化原数据盘了,不然又要麻烦在了
#fdisk -l (如果是第二块硬盘一般为xvdc)
根据提示,依次输入“n”,“p”“1”,两次回车,拍培手“wq”,分区就开始了,很快就会完成
#fdisk /dev/xvdc
#mkfs.ext3 中槐/dev/xvdc
#mkdir /wwwnew
#ount /dev/xvdc /wwwnew
然后开始复制数据,切记不要用mv转移,要用cp,否则数据真有可能会丢失的
#unaslias cp (这只是临时取消cp的别名,不是***的)
#cp -rf /www/* /wwwnew/
然后vi /etc/fstab 把原来默认自动加载数据盘取消
#reboot
#mount /dev/xvdc /www (重新加载数据盘)
#vi /etc/fstab
在***下面一行加上
/dev/xvdc /www ext3 defaults 0 0
保存退袭嫌出即可
各位大神,Python怎么调用阿里云API
这个是Python官方的中文教程有***新的3.4.3版本的也可以选择中英庆闷对照做销基本的东西都讲述的差不多了如果想了解库或模块知乎上大神很誉胡弯多随便找一找都能找到很多有用的建议但是建议不要初期就看过多虚的比较和互撕神马的官方的IDLE用好了之
Python的for循环中,遇到错误后,怎么再按照原来的设置重新运行一遍?
将这段代码 写成方法 然后在这里用while循环去判断 直到返回正常才break
python调用阿里云api导出到excel
实现数据。根据该软件简介可知,导出到excel是差耐为了实现数据。excel,是一款免费的办公软件。MicrosoftExcel是Microsoft为使用Windows和AppleMacintosh操作系统的尺滚电脑编写虚困春的一款电子表格软件。