-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
579 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
composer.phar | ||
/vendor/ | ||
|
||
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control | ||
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file | ||
composer.lock | ||
|
||
.vscode/ | ||
.idea | ||
.DS_Store | ||
|
||
cache/ | ||
*.cache | ||
runtime/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
2021-10-14 Version: 1.0.0 | ||
- For Aliyunape20210922. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Copyright (c) 2009-present, Alibaba Cloud All rights reserved. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
include LICENSE | ||
include *.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
[English](README.md) | 简体中文 | ||
|
||
 | ||
|
||
## Alibaba Cloud aliyunape SDK for Python | ||
|
||
## 要求 | ||
|
||
- Python >= 3.6 | ||
|
||
## 安装 | ||
|
||
- **使用 pip 安装(推荐)** | ||
|
||
如未安装 `pip`, 请先至pip官网 [pip user guide](https://pip.pypa.io/en/stable/installing/ "pip User Guide") 安装pip . | ||
|
||
```bash | ||
# 安装 alibabacloud_aliyunape20210908 | ||
pip install alibabacloud_aliyunape20210908 | ||
``` | ||
|
||
## 问题 | ||
|
||
[提交 Issue](https://github.com/aliyun/alibabacloud-python-sdk/issues/new),不符合指南的问题可能会立即关闭。 | ||
|
||
## 使用说明 | ||
|
||
[快速使用](https://github.com/aliyun/alibabacloud-python-sdk/blob/master/docs/0-Usage-CN.md#%E5%BF%AB%E9%80%9F%E4%BD%BF%E7%94%A8) | ||
|
||
## 发行说明 | ||
|
||
每个版本的详细更改记录在[发行说明](./ChangeLog.md)中。 | ||
|
||
## 相关 | ||
|
||
- [最新源码](https://github.com/aliyun/alibabacloud-python-sdk/) | ||
|
||
## 许可证 | ||
|
||
[Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) | ||
|
||
Copyright (c) 2009-present, Alibaba Cloud All rights reserved. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
English | [简体中文](README-CN.md) | ||
 | ||
|
||
## Alibaba Cloud aliyunape SDK for Python | ||
|
||
## Requirements | ||
|
||
- Python >= 3.6 | ||
|
||
## Installation | ||
|
||
- **Install with pip** | ||
|
||
Python SDK uses a common package management tool named `pip`. If pip is not installed, see the [pip user guide](https://pip.pypa.io/en/stable/installing/ "pip User Guide") to install pip. | ||
|
||
```bash | ||
# Install the alibabacloud_aliyunape20210908 | ||
pip install alibabacloud_aliyunape20210908 | ||
``` | ||
|
||
## Issues | ||
|
||
[Opening an Issue](https://github.com/aliyun/alibabacloud-sdk/issues/new), Issues not conforming to the guidelines may be closed immediately. | ||
|
||
## Usage | ||
|
||
[Quick Examples](https://github.com/aliyun/alibabacloud-python-sdk/blob/master/docs/0-Usage-EN.md#quick-examples) | ||
|
||
## Changelog | ||
|
||
Detailed changes for each release are documented in the [release notes](./ChangeLog.md). | ||
|
||
## References | ||
|
||
- [Latest Release](https://github.com/aliyun/alibabacloud-sdk/tree/master/python) | ||
|
||
## License | ||
|
||
[Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) | ||
|
||
Copyright (c) 2009-present, Alibaba Cloud All rights reserved. |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__version__ = '1.0.0' |
Binary file added
BIN
+230 Bytes
aliyunape-20210908/alibabacloud_aliyunape20210908/__pycache__/__init__.cpython-37.pyc
Binary file not shown.
Binary file added
BIN
+3.85 KB
aliyunape-20210908/alibabacloud_aliyunape20210908/__pycache__/client.cpython-37.pyc
Binary file not shown.
Binary file added
BIN
+5.75 KB
aliyunape-20210908/alibabacloud_aliyunape20210908/__pycache__/models.cpython-37.pyc
Binary file not shown.
136 changes: 136 additions & 0 deletions
136
aliyunape-20210908/alibabacloud_aliyunape20210908/client.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
# -*- coding: utf-8 -*- | ||
# This file is auto-generated, don't edit it. Thanks. | ||
from typing import Dict | ||
from Tea.core import TeaCore | ||
|
||
from alibabacloud_tea_openapi.client import Client as OpenApiClient | ||
from alibabacloud_tea_openapi import models as open_api_models | ||
from alibabacloud_tea_util.client import Client as UtilClient | ||
from alibabacloud_endpoint_util.client import Client as EndpointUtilClient | ||
from alibabacloud_aliyunape20210908 import models as aliyunape_20210908_models | ||
from alibabacloud_tea_util import models as util_models | ||
from alibabacloud_openapi_util.client import Client as OpenApiUtilClient | ||
|
||
|
||
class Client(OpenApiClient): | ||
""" | ||
*\ | ||
""" | ||
def __init__( | ||
self, | ||
config: open_api_models.Config, | ||
): | ||
super().__init__(config) | ||
self._endpoint_rule = '' | ||
self.check_config(config) | ||
self._endpoint = self.get_endpoint('aliyunape', self._region_id, self._endpoint_rule, self._network, self._suffix, self._endpoint_map, self._endpoint) | ||
|
||
def get_endpoint( | ||
self, | ||
product_id: str, | ||
region_id: str, | ||
endpoint_rule: str, | ||
network: str, | ||
suffix: str, | ||
endpoint_map: Dict[str, str], | ||
endpoint: str, | ||
) -> str: | ||
if not UtilClient.empty(endpoint): | ||
return endpoint | ||
if not UtilClient.is_unset(endpoint_map) and not UtilClient.empty(endpoint_map.get(region_id)): | ||
return endpoint_map.get(region_id) | ||
return EndpointUtilClient.get_endpoint_rules(product_id, region_id, endpoint_rule, network, suffix) | ||
|
||
def execute_with_options( | ||
self, | ||
tmp_req: aliyunape_20210908_models.ExecuteRequest, | ||
runtime: util_models.RuntimeOptions, | ||
) -> aliyunape_20210908_models.ExecuteResponse: | ||
UtilClient.validate_model(tmp_req) | ||
request = aliyunape_20210908_models.ExecuteShrinkRequest() | ||
OpenApiUtilClient.convert(tmp_req, request) | ||
if not UtilClient.is_unset(tmp_req.extend_param): | ||
request.extend_param_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.extend_param, 'ExtendParam', 'json') | ||
if not UtilClient.is_unset(tmp_req.service_param): | ||
request.service_param_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.service_param, 'ServiceParam', 'json') | ||
query = {} | ||
query['AppName'] = request.app_name | ||
query['Channel'] = request.channel | ||
query['ExtendParam'] = request.extend_param_shrink | ||
query['OrderId'] = request.order_id | ||
query['RequestId'] = request.request_id | ||
query['ServiceParam'] = request.service_param_shrink | ||
query['UserId'] = request.user_id | ||
req = open_api_models.OpenApiRequest( | ||
query=OpenApiUtilClient.query(query), | ||
body=UtilClient.to_map(request) | ||
) | ||
params = open_api_models.Params( | ||
action='Execute', | ||
version='2021-09-08', | ||
protocol='HTTPS', | ||
pathname='/', | ||
method='POST', | ||
auth_type='AK', | ||
style='RPC', | ||
req_body_type='json', | ||
body_type='json' | ||
) | ||
return TeaCore.from_map( | ||
aliyunape_20210908_models.ExecuteResponse(), | ||
self.call_api(params, req, runtime) | ||
) | ||
|
||
async def execute_with_options_async( | ||
self, | ||
tmp_req: aliyunape_20210908_models.ExecuteRequest, | ||
runtime: util_models.RuntimeOptions, | ||
) -> aliyunape_20210908_models.ExecuteResponse: | ||
UtilClient.validate_model(tmp_req) | ||
request = aliyunape_20210908_models.ExecuteShrinkRequest() | ||
OpenApiUtilClient.convert(tmp_req, request) | ||
if not UtilClient.is_unset(tmp_req.extend_param): | ||
request.extend_param_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.extend_param, 'ExtendParam', 'json') | ||
if not UtilClient.is_unset(tmp_req.service_param): | ||
request.service_param_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.service_param, 'ServiceParam', 'json') | ||
query = {} | ||
query['AppName'] = request.app_name | ||
query['Channel'] = request.channel | ||
query['ExtendParam'] = request.extend_param_shrink | ||
query['OrderId'] = request.order_id | ||
query['RequestId'] = request.request_id | ||
query['ServiceParam'] = request.service_param_shrink | ||
query['UserId'] = request.user_id | ||
req = open_api_models.OpenApiRequest( | ||
query=OpenApiUtilClient.query(query), | ||
body=UtilClient.to_map(request) | ||
) | ||
params = open_api_models.Params( | ||
action='Execute', | ||
version='2021-09-08', | ||
protocol='HTTPS', | ||
pathname='/', | ||
method='POST', | ||
auth_type='AK', | ||
style='RPC', | ||
req_body_type='json', | ||
body_type='json' | ||
) | ||
return TeaCore.from_map( | ||
aliyunape_20210908_models.ExecuteResponse(), | ||
await self.call_api_async(params, req, runtime) | ||
) | ||
|
||
def execute( | ||
self, | ||
request: aliyunape_20210908_models.ExecuteRequest, | ||
) -> aliyunape_20210908_models.ExecuteResponse: | ||
runtime = util_models.RuntimeOptions() | ||
return self.execute_with_options(request, runtime) | ||
|
||
async def execute_async( | ||
self, | ||
request: aliyunape_20210908_models.ExecuteRequest, | ||
) -> aliyunape_20210908_models.ExecuteResponse: | ||
runtime = util_models.RuntimeOptions() | ||
return await self.execute_with_options_async(request, runtime) |
Oops, something went wrong.