Skip to content

Commit e25acc5

Browse files
authored
Merge pull request #102 from Tanc009/master
jdcloud-sdk-python 1.6.68
2 parents cddf42b + f67d2f5 commit e25acc5

28 files changed

Lines changed: 749 additions & 3 deletions

demo/vm_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ def testCreateAndDeleteInstance(self):
9393
imageId='98d44a0f-88c1-451a-8971-f1f769073b6c',
9494
primaryNetworkInterface=network, systemDisk=sysDisk,
9595
dataDisks=None, keyNames=None, description='python-sdk-vm')
96-
param = CreateInstancesParameters('cn-north-1')
97-
param.setInstanceSpec(instanceSpec)
96+
param = CreateInstancesParameters('cn-north-1', instanceSpec)
9897
param.setMaxCount(1)
9998
request = CreateInstancesRequest(param)
10099
create_resp = self.client.send(request)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# 更新历史 #
2+
API版本:0.0.2
3+
4+
| 发布时间 | 版本号 | 更新 | 说明 |
5+
| ---------- | ------ | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
6+
| 2020-07-07 | 0.0.2 | 完善返回字段描述信息 | 开放查询余额openAPI接口,完善返回字段描述信息 | |
7+
| 2019-04-30 | 0.0.1 | 接口新增与更新 |初始版本,提供控制台以下功能接口:<br>1、控制台查询余额、充值状态、余额预警信息<br>2、消费/充值/提现列表<br>3、设置余额预警(开关/金额<br>4、充值、提现 | |
8+

jdcloud_sdk/services/asset/__init__.py

Whitespace-only changes.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# coding=utf8
2+
3+
# Copyright 2018 JDCLOUD.COM
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# NOTE: This class is auto generated by the jdcloud code generator program.
18+
19+
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest
20+
21+
22+
class DescribeAccountAmountRequest(JDCloudRequest):
23+
"""
24+
查询账户金额(总金额、可用金额、冻结金额、可提现金额、提现中金额)
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(DescribeAccountAmountRequest, self).__init__(
29+
'/regions/{regionId}/assets:describeAccountAmount', 'GET', header, version)
30+
self.parameters = parameters
31+
32+
33+
class DescribeAccountAmountParameters(object):
34+
35+
def __init__(self, regionId, ):
36+
"""
37+
:param regionId: Region ID
38+
"""
39+
40+
self.regionId = regionId
41+
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# coding=utf8
2+
3+
# Copyright 2018 JDCLOUD.COM
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# NOTE: This class is auto generated by the jdcloud code generator program.
18+
19+
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest
20+
21+
22+
class ModifyBalanceWarningInfoRequest(JDCloudRequest):
23+
"""
24+
设置余额预警信息
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v1"):
28+
super(ModifyBalanceWarningInfoRequest, self).__init__(
29+
'/regions/{regionId}/assets:modifyBalanceWarningInfo', 'POST', header, version)
30+
self.parameters = parameters
31+
32+
33+
class ModifyBalanceWarningInfoParameters(object):
34+
35+
def __init__(self, regionId, balanceWarningInfoVo):
36+
"""
37+
:param regionId: Region ID
38+
:param balanceWarningInfoVo:
39+
"""
40+
41+
self.regionId = regionId
42+
self.balanceWarningInfoVo = balanceWarningInfoVo
43+

jdcloud_sdk/services/asset/apis/__init__.py

Whitespace-only changes.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# coding=utf8
2+
3+
# Copyright 2018 JDCLOUD.COM
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# NOTE: This class is auto generated by the jdcloud code generator program.
18+
19+
from jdcloud_sdk.core.jdcloudclient import JDCloudClient
20+
from jdcloud_sdk.core.config import Config
21+
22+
23+
class AssetClient(JDCloudClient):
24+
25+
def __init__(self, credential, config=None, logger=None):
26+
if config is None:
27+
config = Config('asset.jdcloud-api.com')
28+
29+
super(AssetClient, self).__init__(credential, config, 'asset', '0.0.2', logger)

jdcloud_sdk/services/asset/client/__init__.py

Whitespace-only changes.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# coding=utf8
2+
3+
# Copyright 2018 JDCLOUD.COM
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# NOTE: This class is auto generated by the jdcloud code generator program.
18+
19+
20+
class BalanceWarningInfoVo(object):
21+
22+
def __init__(self, status=None, threshold=None):
23+
"""
24+
:param status: (Optional) 余额预警状态:1-启用;2-停用(状态不为空时修改状态)
25+
:param threshold: (Optional) 余额预警阈值
26+
"""
27+
28+
self.status = status
29+
self.threshold = threshold
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# coding=utf8
2+
3+
# Copyright 2018 JDCLOUD.COM
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# NOTE: This class is auto generated by the jdcloud code generator program.
18+
19+
20+
class BalanceWarningStatusVo(object):
21+
22+
def __init__(self, status=None):
23+
"""
24+
:param status: (Optional) 余额预警状态
25+
"""
26+
27+
self.status = status

0 commit comments

Comments
 (0)