Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit043fe00

Browse files
authored
Merge branch 'master' into add-readme-timeout
2 parents186eb9a +41d88d1 commit043fe00

File tree

9,160 files changed

+326149
-74343
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

9,160 files changed

+326149
-74343
lines changed

‎.codecov.yml‎

Lines changed: 0 additions & 3 deletions
This file was deleted.

‎.travis.yml‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ sudo: false
33
language:python
44

55
python:
6-
-"2.6"
76
-"2.7"
8-
-"3.3"
97
-"3.4"
108
-"3.5"
119
-"3.6"

‎README.md‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ This document introduces how to obtain and call Alibaba Cloud Python SDK.
2020
<imgsrc="https://img.alicdn.com/tfs/TB12GX6zW6qK1RjSZFmXXX0PFXa-744-122.png"width="180" />
2121
</a>
2222

23+
##Documentation
24+
25+
-[Requirements](docs/0-Requirement-EN.md)
26+
-[Installation](./docs/1-Installation-EN.md)
27+
-[Client](./docs/2-Client-EN.md)
28+
-[Timeout](./docs/3-Timeout-EN.md)
29+
-[Proxy Configurations](./docs/4-Proxy-EN.md)
30+
-[Log](./docs/5-Log-EN.md)
2331

2432
##Prerequisites
2533

@@ -80,7 +88,7 @@ You can install the Alibaba Cloud Python SDK using the following two methods. Re
8088

8189
-`access-key-id`is the AccesskeyIDfor your account.
8290
-`access-key-secret`is the AccessKey secretfor your account.
83-
-`region-id`is theID of the region where the serviceis called. For alist of region IDs, see [Regionsand zones](~~40654~~).
91+
-`region-id`is theID of the region where the serviceis called. For alist of region IDs, see [Regionsand zones](https://www.alibabacloud.com/help/doc-detail/40654.html).
8492

8593
>**Note:** The sequence of these parameters cannot be changed.
8694

‎README_zh.md‎

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
欢迎使用阿里云开发者工具套件(SDK)。阿里云 Python SDK 让您不用复杂编程即可访问云服务器、云监控等多个阿里云服务。这里向您介绍如何获取阿里云 Python SDK 并开始调用。
88

9-
如果您在使用 SDK 的过程中遇到任何问题,欢迎前往[阿里云 SDK 问答社区](https://yq.aliyun.com/tags/type_ask-tagid_23350)提问,提问前请阅读[提问引导](https://help.aliyun.com/document_detail/93957.html)。亦可在当前 GitHub 提交 Issues。
9+
如果您在使用 SDK 的过程中遇到任何问题,欢迎前往[阿里云 SDK 问答社区](https://yq.aliyun.com/tags/type_ask-tagid_23350)提问,提问前请阅读[提问引导](https://help.aliyun.com/document_detail/93957.html)。亦可在当前 GitHub 提交 Issues。
1010

1111
##在线示例
1212

@@ -16,10 +16,19 @@
1616
<imgsrc="https://img.alicdn.com/tfs/TB12GX6zW6qK1RjSZFmXXX0PFXa-744-122.png"width="180" />
1717
</a>
1818

19+
##文档
20+
21+
-[环境要求](./docs/0-Requirement-CN.md)
22+
-[安装](./docs/1-Installation-CN.md)
23+
-[客户端](./docs/2-Client-CN.md)
24+
-[超时机制](./docs/3-Timeout-CN.md)
25+
-[代理配置](./docs/4-Proxy-CN.md)
26+
-[日志](./docs/5-Log-CN.md)
27+
1928
##环境准备
2029

21-
1. 要使用阿里云<spanstyle="background-color:rgb(250,250,250);"><spanstyle="color:rgb(89,89,89);">Python</span></span> SDK,您需要一个云账号以及一对`Access Key ID``Access Key Secret`。 请在阿里云控制台中的[AccessKey管理页面](https://usercenter.console.aliyun.com/?spm=5176.doc52740.2.3.QKZk8w#/manage/ak)上创建和查看您的Access Key,或者联系您的系统管理员
22-
2.要使用阿里云SDK访问某个产品的API,您需要事先在[阿里云控制台](https://home.console.aliyun.com/?spm=5176.doc52740.2.4.QKZk8w)中开通这个产品。
30+
1. 要使用阿里云Python SDK,您需要一个云账号以及一对`Access Key ID``Access Key Secret`。 请在阿里云控制台中的[AccessKey管理页面](https://usercenter.console.aliyun.com/?spm=5176.doc52740.2.3.QKZk8w#/manage/ak) 上创建和查看您的 Access Key,或者联系您的系统管理员
31+
2.要使用阿里云 SDK 访问某个产品的 API,您需要事先在[阿里云控制台](https://home.console.aliyun.com/?spm=5176.doc52740.2.4.QKZk8w)中开通这个产品。
2332

2433
##SDK 获取和安装
2534

@@ -32,10 +41,10 @@ pip install aliyun-python-sdk-ecs # 安装管理 ECS SDK
3241

3342
##开始调用
3443

35-
以下这个代码示例向您展示了调用阿里云Python SDK的3个主要步骤
44+
以下这个代码示例向您展示了调用阿里云 Python SDK 的3个主要步骤
3645

37-
1.创建Client实例
38-
2.创建API请求并设置参数
46+
1.创建 Client 实例
47+
2.创建 API 请求并设置参数
3948
3. 发起请求并处理异常
4049

4150

@@ -60,10 +69,10 @@ response = client.do_action_with_exception(request)
6069
print response
6170
```
6271

63-
在创建 Client 实例时,您需要填写3个参数:Region ID、Access KeyID和AccessKey Secret。Access KeyID和AccessKeySecret可以从控制台获得;而 Region ID 可以从[地域列表](https://help.aliyun.com/document_detail/40654.html?spm=5176.doc52740.2.8.FogWrd) 中获得
72+
在创建 Client 实例时,您需要填写 3 个参数:Region ID、Access KeyID 和 AccessKey Secret。Access KeyID 和 AccessKeySecret 可以从控制台获得;而 Region ID 可以从[地域列表](https://help.aliyun.com/document_detail/40654.html) 中获得
6473

6574
##HTTP DEBUG
66-
要使用HTTP DEBUG 功能,需要在您的环境变量配置`DEBUG`,其对应的值可以为`sdk``SDK`
75+
要使用 HTTP DEBUG 功能,需要在您的环境变量配置`DEBUG`,其对应的值可以为`sdk``SDK`
6776

6877
**HTTP DEBUG**展现如下信息,帮助您调试代码:
6978

@@ -100,7 +109,7 @@ print response
100109

101110
请求设置的超时优先级高于客户端设置的超时,配置文件优先级次之。当您未设置任何超时时,则默认读超时为10秒,连接超时为5秒。
102111

103-
```python
112+
```python
104113
# 设置请求超时(仅对当前请求有效)
105114
request= ListUsersRequest()
106115
request.set_read_timeout(5)# 设置请求读超时为5秒
@@ -111,5 +120,4 @@ request.get_connect_timeout() # 获取请求连接超时
111120
# 设置客户端超时(对所有通过该客户端发送的请求生效)
112121
# 设置客户端连接超时为2秒,读超时为5秒
113122
client= AcsClient('access_key_id','access_key_secret',connect_timeout=2,timeout=5)
114-
```
115-
123+
```
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2019-11-18 Version: 2.1.1
2+
- Supported ChangePreferredLanguage for Internet customers.
3+
- Fixed bugs for ChangePreferredLanguage.
4+
5+
2019-10-31 Version: 2.1.0
6+
- Supported ChangePreferredLanguage for Internet customers.
7+
8+
2019-10-31 Version: 1.1.0
9+
- Supported ChangePreferredLanguage for Internet customers.
10+

‎aliyun-python-sdk-aas/README.rst‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1+
=============================================================
12
aliyun-python-sdk-aas
2-
This is the aas module of Aliyun Python SDK.
3+
=============================================================
4+
5+
.. This is the aas module of Aliyun Python SDK.
36
47
Aliyun Python SDK is the official software development kit. It makes things easy to integrate your Python application, library, or script with Aliyun services.
58

69
This module works on Python versions:
710

811
2.6.5 and greater
9-
Documentation:
1012

11-
Please visit http://develop.aliyun.com/sdk/python
13+
**Documentation:**
14+
15+
Please visit `http://develop.aliyun.com/sdk/python<http://develop.aliyun.com/sdk/python>`_
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__='2.0.1'
1+
__version__='2.1.1'
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# # Licensed to the Apache Software Foundation (ASF) under one
2+
# # or more contributor license agreements. See the NOTICE file
3+
# # distributed with this work for additional information
4+
# # regarding copyright ownership. The ASF licenses this file
5+
# # to you under the Apache License, Version 2.0 (the
6+
# # "License"); you may not use this file except in compliance
7+
# # with the License. You may obtain a copy of the License at
8+
# #
9+
# #
10+
# # http://www.apache.org/licenses/LICENSE-2.0
11+
# #
12+
# #
13+
# # Unless required by applicable law or agreed to in writing,
14+
# # software distributed under the License is distributed on an
15+
# # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# # KIND, either express or implied. See the License for the
17+
# # specific language governing permissions and limitations
18+
# # under the License.
19+
20+
21+
classEndpointData():
22+
def__init__(self):
23+
self.endpoint_map= {
24+
"cn-shanghai-internal-test-1":"aas.aliyuncs.com",
25+
"cn-beijing-gov-1":"aas.aliyuncs.com",
26+
"cn-shenzhen-su18-b01":"aas.aliyuncs.com",
27+
"cn-shanghai-inner":"aas.aliyuncs.com",
28+
"cn-shenzhen-st4-d01":"aas.aliyuncs.com",
29+
"cn-haidian-cm12-c01":"aas.aliyuncs.com",
30+
"cn-hangzhou-internal-prod-1":"aas.aliyuncs.com",
31+
"cn-north-2-gov-1":"aas.aliyuncs.com",
32+
"cn-yushanfang":"aas.aliyuncs.com",
33+
"cn-hongkong-finance-pop":"aas.aliyuncs.com",
34+
"cn-qingdao-nebula":"aas.aliyuncs.com",
35+
"cn-shanghai":"aas-vpc.cn-shanghai.aliyuncs.com",
36+
"cn-shanghai-finance-1":"aas.aliyuncs.com",
37+
"cn-beijing-finance-pop":"aas.aliyuncs.com",
38+
"cn-wuhan":"aas.aliyuncs.com",
39+
"cn-shenzhen":"aas.aliyuncs.com",
40+
"cn-zhengzhou-nebula-1":"aas.aliyuncs.com",
41+
"rus-west-1-pop":"aas.ap-northeast-1.aliyuncs.com",
42+
"cn-shanghai-et15-b01":"aas.aliyuncs.com",
43+
"cn-hangzhou-bj-b01":"aas.aliyuncs.com",
44+
"cn-hangzhou-internal-test-1":"aas.aliyuncs.com",
45+
"eu-west-1-oxs":"aas.ap-northeast-1.aliyuncs.com",
46+
"cn-zhangbei-na61-b01":"aas.aliyuncs.com",
47+
"cn-beijing-finance-1":"aas.aliyuncs.com",
48+
"cn-hangzhou-internal-test-3":"aas.aliyuncs.com",
49+
"cn-hangzhou-internal-test-2":"aas.aliyuncs.com",
50+
"cn-shenzhen-finance-1":"aas.aliyuncs.com",
51+
"cn-chengdu":"aas.aliyuncs.com",
52+
"cn-hangzhou-test-306":"aas.aliyuncs.com",
53+
"cn-shanghai-et2-b01":"aas.aliyuncs.com",
54+
"cn-hangzhou-finance":"aas.aliyuncs.com",
55+
"cn-beijing-nu16-b01":"aas.aliyuncs.com",
56+
"cn-edge-1":"aas.aliyuncs.com",
57+
"cn-huhehaote":"aas.aliyuncs.com",
58+
"cn-fujian":"aas.aliyuncs.com",
59+
"us-east-1":"aas.ap-northeast-1.aliyuncs.com",
60+
"ap-northeast-2-pop":"aas.ap-northeast-1.aliyuncs.com",
61+
"cn-shenzhen-inner":"aas.aliyuncs.com",
62+
"cn-zhangjiakou-na62-a01":"aas.aliyuncs.com",
63+
}
64+
self.endpoint_regional="regional"
65+
66+
defgetEndpointMap(self):
67+
returnself.endpoint_map
68+
69+
defgetEndpointRegional(self):
70+
returnself.endpoint_regional
71+
72+
73+
endpoint_data=EndpointData()

‎aliyun-python-sdk-aas/aliyunsdkaas/request/__init__.py‎

100755100644
File mode changed.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
fromaliyunsdkcore.requestimportRpcRequest
21+
fromaliyunsdkaas.endpointimportendpoint_data
22+
23+
classChangePreferredLanguageRequest(RpcRequest):
24+
25+
def__init__(self):
26+
RpcRequest.__init__(self,'Aas','2015-07-01','ChangePreferredLanguage')
27+
ifhasattr(self,"endpoint_map"):
28+
setattr(self,"endpoint_map",endpoint_data.getEndpointMap())
29+
ifhasattr(self,"endpoint_regional"):
30+
setattr(self,"endpoint_regional",endpoint_data.getEndpointRegional())
31+
32+
33+
defget_PreferredLanguage(self):
34+
returnself.get_query_params().get('PreferredLanguage')
35+
36+
defset_PreferredLanguage(self,PreferredLanguage):
37+
self.add_query_param('PreferredLanguage',PreferredLanguage)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp