Skip to content

Commit c32a49c

Browse files
Merge pull request #291 from jdcloud-apigateway/master
merge
2 parents 052631e + cc28910 commit c32a49c

967 files changed

Lines changed: 48187 additions & 42 deletions

File tree

Some content is hidden

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

jdcloud_sdk/services/agentgrid/__init__.py

Whitespace-only changes.
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
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 CreateBrowserToolRequest(JDCloudRequest):
23+
"""
24+
创建一个 Browser Tool 资源。
25+
26+
## 接口说明
27+
- 支持通过 `clientToken` 保证请求幂等性。
28+
- 创建成功后由服务端自动生成 `apiKey`。
29+
- Browser Tool 状态包括:`pending`(已受理,等待资源准备)、`ready`(可创建 Session)、`failed`(处理失败)、`deleting`(删除中)、`deleted`(已删除)。
30+
- 本接口为异步接口。请求受理成功后,资源通常先进入 `pending`,待底层资源准备完成后进入 `ready`;如创建失败则进入 `failed`。建议通过“查询 Browser Tool 详情”或“查询 Browser Tool 列表”轮询确认最终状态。
31+
32+
"""
33+
34+
def __init__(self, parameters, header=None, version="v1"):
35+
super(CreateBrowserToolRequest, self).__init__(
36+
'/regions/{regionId}/browserTools', 'POST', header, version)
37+
self.parameters = parameters
38+
39+
40+
class CreateBrowserToolParameters(object):
41+
42+
def __init__(self,regionId, name, networkConfiguration, ):
43+
"""
44+
:param regionId: Region ID
45+
:param name: Browser Tool 名称。长度为 1~32 个字符,可包含中文、数字、大小写字母、下划线、中划线或点。
46+
:param networkConfiguration: Browser Tool 网络配置类型。当前支持 `Public` 和 `SandBox`,建议显式传值。
47+
"""
48+
49+
self.regionId = regionId
50+
self.name = name
51+
self.description = None
52+
self.authenticationType = None
53+
self.networkConfiguration = networkConfiguration
54+
self.clientToken = None
55+
56+
def setDescription(self, description):
57+
"""
58+
:param description: (Optional) Browser Tool 描述信息,长度不超过 256 个字符。
59+
"""
60+
self.description = description
61+
62+
def setAuthenticationType(self, authenticationType):
63+
"""
64+
:param authenticationType: (Optional) Browser Tool 鉴权方式,当前仅支持 `APIKey`
65+
"""
66+
self.authenticationType = authenticationType
67+
68+
def setClientToken(self, clientToken):
69+
"""
70+
:param clientToken: (Optional) 用于保证请求幂等性。
71+
"""
72+
self.clientToken = clientToken
73+
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
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 CreateBrowserToolSessionRequest(JDCloudRequest):
23+
"""
24+
创建并初始化 Browser Tool Session。
25+
26+
## 接口说明
27+
- 支持通过 `clientToken` 保证请求幂等性。
28+
- Session 状态包括:`pending`(已受理,等待资源准备)、`creating`(初始化中)、`ready`(可连接使用)、`deleting`(删除中)、`deleted`(已删除)、`failed`(初始化失败)。
29+
- 本接口为异步接口。请求受理成功后返回 `sessionId`,Session 通常会依次经历 `pending`、`creating`,最终进入 `ready` 或 `failed`。建议通过“查询 Browser Tool Session 详情”轮询确认状态;仅当 `state` 为 `ready` 时,`cdpEndpoint`、`vncEndpoint` 才可用于接入。
30+
31+
"""
32+
33+
def __init__(self, parameters, header=None, version="v1"):
34+
super(CreateBrowserToolSessionRequest, self).__init__(
35+
'/regions/{regionId}/browserTools/{browserToolId}/sessions', 'POST', header, version)
36+
self.parameters = parameters
37+
38+
39+
class CreateBrowserToolSessionParameters(object):
40+
41+
def __init__(self,regionId, browserToolId, ):
42+
"""
43+
:param regionId: Region ID
44+
:param browserToolId: Browser Tool ID
45+
"""
46+
47+
self.regionId = regionId
48+
self.browserToolId = browserToolId
49+
self.name = None
50+
self.maxLifeTime = None
51+
self.clientToken = None
52+
53+
def setName(self, name):
54+
"""
55+
:param name: (Optional) Session 名称。
56+
"""
57+
self.name = name
58+
59+
def setMaxLifeTime(self, maxLifeTime):
60+
"""
61+
:param maxLifeTime: (Optional) Session 最大存活时长(秒)。取值范围 60~28800,默认值为 28800。
62+
"""
63+
self.maxLifeTime = maxLifeTime
64+
65+
def setClientToken(self, clientToken):
66+
"""
67+
:param clientToken: (Optional) 用于保证请求幂等性。
68+
"""
69+
self.clientToken = clientToken
70+
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
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 CreateCodeInterpreterRequest(JDCloudRequest):
23+
"""
24+
创建一个 Code Interpreter 工具实例。
25+
26+
## 接口说明
27+
- 支持通过 `clientToken` 保证请求幂等性。
28+
- 创建成功后由服务端自动生成 `apiKey`。
29+
- Code Interpreter 状态包括:`pending`(已受理,等待资源准备)、`ready`(可创建 Session)、`failed`(处理失败)、`deleting`(删除中)、`deleted`(已删除)。
30+
- 本接口为异步接口。请求受理成功后,资源通常先进入 `pending`,待底层资源准备完成后进入 `ready`;如创建失败则进入 `failed`。建议通过“查询 Code Interpreter 详情”或“查询 Code Interpreter 列表”轮询确认最终状态。
31+
32+
"""
33+
34+
def __init__(self, parameters, header=None, version="v1"):
35+
super(CreateCodeInterpreterRequest, self).__init__(
36+
'/regions/{regionId}/codeInterpreters', 'POST', header, version)
37+
self.parameters = parameters
38+
39+
40+
class CreateCodeInterpreterParameters(object):
41+
42+
def __init__(self,regionId, name, networkConfiguration):
43+
"""
44+
:param regionId: Region ID
45+
:param name: Code Interpreter 名称,全局唯一。
46+
:param networkConfiguration: Code Interpreter 网络配置类型。当前支持 `Public` 和 `SandBox`,建议显式传值。
47+
"""
48+
49+
self.regionId = regionId
50+
self.name = name
51+
self.description = None
52+
self.authenticationType = None
53+
self.clientToken = None
54+
self.networkConfiguration = networkConfiguration
55+
56+
def setDescription(self, description):
57+
"""
58+
:param description: (Optional) Code Interpreter 描述信息。
59+
"""
60+
self.description = description
61+
62+
def setAuthenticationType(self, authenticationType):
63+
"""
64+
:param authenticationType: (Optional) Code Interpreter 鉴权方式,当前仅支持 `APIKey`
65+
"""
66+
self.authenticationType = authenticationType
67+
68+
def setClientToken(self, clientToken):
69+
"""
70+
:param clientToken: (Optional) 用于保证请求幂等性。
71+
"""
72+
self.clientToken = clientToken
73+
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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 CreateCodeInterpreterSessionRequest(JDCloudRequest):
23+
"""
24+
创建并初始化 Code Interpreter Session。
25+
26+
## 接口说明
27+
- Session 状态包括:`pending`(已受理,等待资源准备)、`creating`(初始化中)、`ready`(可执行工具调用)、`deleting`(删除中)、`deleted`(已删除)、`failed`(初始化失败)。
28+
- 本接口为异步接口。请求受理成功后返回 `sessionId`,Session 通常会依次经历 `pending`、`creating`,最终进入 `ready` 或 `failed`。建议通过“查询 Code Interpreter Session 详情”轮询确认状态,并在 `state=ready` 后再发起后续调用。
29+
30+
"""
31+
32+
def __init__(self, parameters, header=None, version="v1"):
33+
super(CreateCodeInterpreterSessionRequest, self).__init__(
34+
'/regions/{regionId}/codeInterpreters/{codeInterpreterId}/sessions', 'POST', header, version)
35+
self.parameters = parameters
36+
37+
38+
class CreateCodeInterpreterSessionParameters(object):
39+
40+
def __init__(self,regionId, codeInterpreterId, ):
41+
"""
42+
:param regionId: Region ID
43+
:param codeInterpreterId: Code Interpreter ID
44+
"""
45+
46+
self.regionId = regionId
47+
self.codeInterpreterId = codeInterpreterId
48+
self.name = None
49+
self.maxLifeTime = None
50+
self.clientToken = None
51+
52+
def setName(self, name):
53+
"""
54+
:param name: (Optional) Session 名称。
55+
"""
56+
self.name = name
57+
58+
def setMaxLifeTime(self, maxLifeTime):
59+
"""
60+
:param maxLifeTime: (Optional) Session 存活时间(秒)。取值范围为60~28800,默认为900秒(15分钟)。
61+
"""
62+
self.maxLifeTime = maxLifeTime
63+
64+
def setClientToken(self, clientToken):
65+
"""
66+
:param clientToken: (Optional) 用于保证请求幂等性。
67+
"""
68+
self.clientToken = clientToken
69+
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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 CreateRuntimeEndpointRequest(JDCloudRequest):
23+
"""
24+
为指定 Runtime 创建 Endpoint 访问地址。
25+
26+
## 接口说明
27+
- 调用成功后将返回该 Runtime 的公网与私网访问地址。
28+
- Endpoint 地址可用于后续 Runtime 的调用与接入配置。
29+
30+
"""
31+
32+
def __init__(self, parameters, header=None, version="v1"):
33+
super(CreateRuntimeEndpointRequest, self).__init__(
34+
'/regions/{regionId}/runtimes/{runtimeId}:createEndpoint', 'POST', header, version)
35+
self.parameters = parameters
36+
37+
38+
class CreateRuntimeEndpointParameters(object):
39+
40+
def __init__(self,regionId, runtimeId):
41+
"""
42+
:param regionId: Region ID
43+
:param runtimeId: Runtime ID
44+
"""
45+
46+
self.regionId = regionId
47+
self.runtimeId = runtimeId
48+

0 commit comments

Comments
 (0)