Skip to content

Commit 15ed05e

Browse files
author
BitsAdmin
committed
Merge branch 'kms-Python-2021-02-18-online-1888-2025_11_27_16_53_43' into 'integration_2025-12-04_1090671646466'
feat: [development task] kms-1888-Python (1900535) See merge request iaasng/volcengine-python-sdk!955
2 parents 4c82d4f + e79dd77 commit 15ed05e

13 files changed

+407
-9
lines changed

meta.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"lasted": "4.0.37",
3-
"meta_commit": "7455e9d72f2d679ed240c3594620a164bc78ad52"
2+
"lasted": "4.0.38",
3+
"meta_commit": "0dbdf617e82c932b6bd920c7301f9bf6e85c33f7"
44
}

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "volcengine-python-sdk"
3-
version = "4.0.37"
3+
version = "4.0.38"
44
authors = [
55
{name = "volc-engine", email = "[email protected]"},
66
]

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from setuptools import setup, find_packages # noqa: H301
44

55
NAME = "volcengine-python-sdk"
6-
VERSION = "4.0.37"
6+
VERSION = "4.0.38"
77
# To install the library, run the following
88
#
99
# python setup.py install

volcenginesdkcore/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
6464
self.default_headers[header_name] = header_value
6565
self.cookie = cookie
6666
# Set default User-Agent.
67-
self.user_agent = 'volcstack-python-sdk/4.0.37'
67+
self.user_agent = 'volcstack-python-sdk/4.0.38'
6868
self.client_side_validation = configuration.client_side_validation
6969

7070
self.interceptor_chain = InterceptorChain()

volcenginesdkcore/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def to_debug_report(self):
272272
"OS: {env}\n" \
273273
"Python Version: {pyversion}\n" \
274274
"Version of the API: 0.1.0\n" \
275-
"SDK Package Version: 4.0.37".\
275+
"SDK Package Version: 4.0.38".\
276276
format(env=sys.platform, pyversion=sys.version)
277277

278278
@property

volcenginesdkkms/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
from volcenginesdkkms.models.create_key_response import CreateKeyResponse
4949
from volcenginesdkkms.models.create_keyring_request import CreateKeyringRequest
5050
from volcenginesdkkms.models.create_keyring_response import CreateKeyringResponse
51+
from volcenginesdkkms.models.create_secret_order_request import CreateSecretOrderRequest
52+
from volcenginesdkkms.models.create_secret_order_response import CreateSecretOrderResponse
5153
from volcenginesdkkms.models.create_secret_request import CreateSecretRequest
5254
from volcenginesdkkms.models.create_secret_response import CreateSecretResponse
5355
from volcenginesdkkms.models.custom_key_store_for_create_custom_key_store_output import CustomKeyStoreForCreateCustomKeyStoreOutput

volcenginesdkkms/api/kms_api.py

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1488,6 +1488,103 @@ def create_secret_with_http_info(self, body, **kwargs): # noqa: E501
14881488
_request_timeout=params.get('_request_timeout'),
14891489
collection_formats=collection_formats)
14901490

1491+
def create_secret_order(self, body, **kwargs): # noqa: E501
1492+
"""create_secret_order # noqa: E501
1493+
1494+
This method makes a synchronous HTTP request by default. To make an
1495+
asynchronous HTTP request, please pass async_req=True
1496+
>>> thread = api.create_secret_order(body, async_req=True)
1497+
>>> result = thread.get()
1498+
1499+
:param async_req bool
1500+
:param CreateSecretOrderRequest body: (required)
1501+
:return: CreateSecretOrderResponse
1502+
If the method is called asynchronously,
1503+
returns the request thread.
1504+
"""
1505+
kwargs['_return_http_data_only'] = True
1506+
if kwargs.get('async_req'):
1507+
return self.create_secret_order_with_http_info(body, **kwargs) # noqa: E501
1508+
else:
1509+
(data) = self.create_secret_order_with_http_info(body, **kwargs) # noqa: E501
1510+
return data
1511+
1512+
def create_secret_order_with_http_info(self, body, **kwargs): # noqa: E501
1513+
"""create_secret_order # noqa: E501
1514+
1515+
This method makes a synchronous HTTP request by default. To make an
1516+
asynchronous HTTP request, please pass async_req=True
1517+
>>> thread = api.create_secret_order_with_http_info(body, async_req=True)
1518+
>>> result = thread.get()
1519+
1520+
:param async_req bool
1521+
:param CreateSecretOrderRequest body: (required)
1522+
:return: CreateSecretOrderResponse
1523+
If the method is called asynchronously,
1524+
returns the request thread.
1525+
"""
1526+
1527+
all_params = ['body'] # noqa: E501
1528+
all_params.append('async_req')
1529+
all_params.append('_return_http_data_only')
1530+
all_params.append('_preload_content')
1531+
all_params.append('_request_timeout')
1532+
1533+
params = locals()
1534+
for key, val in six.iteritems(params['kwargs']):
1535+
if key not in all_params:
1536+
raise TypeError(
1537+
"Got an unexpected keyword argument '%s'"
1538+
" to method create_secret_order" % key
1539+
)
1540+
params[key] = val
1541+
del params['kwargs']
1542+
# verify the required parameter 'body' is set
1543+
if self.api_client.client_side_validation and ('body' not in params or
1544+
params['body'] is None): # noqa: E501
1545+
raise ValueError("Missing the required parameter `body` when calling `create_secret_order`") # noqa: E501
1546+
1547+
collection_formats = {}
1548+
1549+
path_params = {}
1550+
1551+
query_params = []
1552+
1553+
header_params = {}
1554+
1555+
form_params = []
1556+
local_var_files = {}
1557+
1558+
body_params = None
1559+
if 'body' in params:
1560+
body_params = params['body']
1561+
# HTTP header `Accept`
1562+
header_params['Accept'] = self.api_client.select_header_accept(
1563+
['application/json']) # noqa: E501
1564+
1565+
# HTTP header `Content-Type`
1566+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
1567+
['application/json']) # noqa: E501
1568+
1569+
# Authentication setting
1570+
auth_settings = ['volcengineSign'] # noqa: E501
1571+
1572+
return self.api_client.call_api(
1573+
'/CreateSecretOrder/2021-02-18/kms/post/application_json/', 'POST',
1574+
path_params,
1575+
query_params,
1576+
header_params,
1577+
body=body_params,
1578+
post_params=form_params,
1579+
files=local_var_files,
1580+
response_type='CreateSecretOrderResponse', # noqa: E501
1581+
auth_settings=auth_settings,
1582+
async_req=params.get('async_req'),
1583+
_return_http_data_only=params.get('_return_http_data_only'),
1584+
_preload_content=params.get('_preload_content', True),
1585+
_request_timeout=params.get('_request_timeout'),
1586+
collection_formats=collection_formats)
1587+
14911588
def decrypt(self, body, **kwargs): # noqa: E501
14921589
"""decrypt # noqa: E501
14931590

volcenginesdkkms/models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@
4444
from volcenginesdkkms.models.create_key_response import CreateKeyResponse
4545
from volcenginesdkkms.models.create_keyring_request import CreateKeyringRequest
4646
from volcenginesdkkms.models.create_keyring_response import CreateKeyringResponse
47+
from volcenginesdkkms.models.create_secret_order_request import CreateSecretOrderRequest
48+
from volcenginesdkkms.models.create_secret_order_response import CreateSecretOrderResponse
4749
from volcenginesdkkms.models.create_secret_request import CreateSecretRequest
4850
from volcenginesdkkms.models.create_secret_response import CreateSecretResponse
4951
from volcenginesdkkms.models.custom_key_store_for_create_custom_key_store_output import CustomKeyStoreForCreateCustomKeyStoreOutput
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
# coding: utf-8
2+
3+
"""
4+
kms
5+
6+
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
7+
8+
OpenAPI spec version: common-version
9+
10+
Generated by: https://github.com/swagger-api/swagger-codegen.git
11+
"""
12+
13+
14+
import pprint
15+
import re # noqa: F401
16+
17+
import six
18+
19+
from volcenginesdkcore.configuration import Configuration
20+
21+
22+
class CreateSecretOrderRequest(object):
23+
"""NOTE: This class is auto generated by the swagger code generator program.
24+
25+
Do not edit the class manually.
26+
"""
27+
28+
"""
29+
Attributes:
30+
swagger_types (dict): The key is attribute name
31+
and the value is attribute type.
32+
attribute_map (dict): The key is attribute name
33+
and the value is json key in definition.
34+
"""
35+
swagger_types = {
36+
'region_id': 'str'
37+
}
38+
39+
attribute_map = {
40+
'region_id': 'RegionId'
41+
}
42+
43+
def __init__(self, region_id=None, _configuration=None): # noqa: E501
44+
"""CreateSecretOrderRequest - a model defined in Swagger""" # noqa: E501
45+
if _configuration is None:
46+
_configuration = Configuration()
47+
self._configuration = _configuration
48+
49+
self._region_id = None
50+
self.discriminator = None
51+
52+
self.region_id = region_id
53+
54+
@property
55+
def region_id(self):
56+
"""Gets the region_id of this CreateSecretOrderRequest. # noqa: E501
57+
58+
59+
:return: The region_id of this CreateSecretOrderRequest. # noqa: E501
60+
:rtype: str
61+
"""
62+
return self._region_id
63+
64+
@region_id.setter
65+
def region_id(self, region_id):
66+
"""Sets the region_id of this CreateSecretOrderRequest.
67+
68+
69+
:param region_id: The region_id of this CreateSecretOrderRequest. # noqa: E501
70+
:type: str
71+
"""
72+
if self._configuration.client_side_validation and region_id is None:
73+
raise ValueError("Invalid value for `region_id`, must not be `None`") # noqa: E501
74+
75+
self._region_id = region_id
76+
77+
def to_dict(self):
78+
"""Returns the model properties as a dict"""
79+
result = {}
80+
81+
for attr, _ in six.iteritems(self.swagger_types):
82+
value = getattr(self, attr)
83+
if isinstance(value, list):
84+
result[attr] = list(map(
85+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
86+
value
87+
))
88+
elif hasattr(value, "to_dict"):
89+
result[attr] = value.to_dict()
90+
elif isinstance(value, dict):
91+
result[attr] = dict(map(
92+
lambda item: (item[0], item[1].to_dict())
93+
if hasattr(item[1], "to_dict") else item,
94+
value.items()
95+
))
96+
else:
97+
result[attr] = value
98+
if issubclass(CreateSecretOrderRequest, dict):
99+
for key, value in self.items():
100+
result[key] = value
101+
102+
return result
103+
104+
def to_str(self):
105+
"""Returns the string representation of the model"""
106+
return pprint.pformat(self.to_dict())
107+
108+
def __repr__(self):
109+
"""For `print` and `pprint`"""
110+
return self.to_str()
111+
112+
def __eq__(self, other):
113+
"""Returns true if both objects are equal"""
114+
if not isinstance(other, CreateSecretOrderRequest):
115+
return False
116+
117+
return self.to_dict() == other.to_dict()
118+
119+
def __ne__(self, other):
120+
"""Returns true if both objects are not equal"""
121+
if not isinstance(other, CreateSecretOrderRequest):
122+
return True
123+
124+
return self.to_dict() != other.to_dict()
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# coding: utf-8
2+
3+
"""
4+
kms
5+
6+
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
7+
8+
OpenAPI spec version: common-version
9+
10+
Generated by: https://github.com/swagger-api/swagger-codegen.git
11+
"""
12+
13+
14+
import pprint
15+
import re # noqa: F401
16+
17+
import six
18+
19+
from volcenginesdkcore.configuration import Configuration
20+
21+
22+
class CreateSecretOrderResponse(object):
23+
"""NOTE: This class is auto generated by the swagger code generator program.
24+
25+
Do not edit the class manually.
26+
"""
27+
28+
"""
29+
Attributes:
30+
swagger_types (dict): The key is attribute name
31+
and the value is attribute type.
32+
attribute_map (dict): The key is attribute name
33+
and the value is json key in definition.
34+
"""
35+
swagger_types = {
36+
}
37+
38+
attribute_map = {
39+
}
40+
41+
def __init__(self, _configuration=None): # noqa: E501
42+
"""CreateSecretOrderResponse - a model defined in Swagger""" # noqa: E501
43+
if _configuration is None:
44+
_configuration = Configuration()
45+
self._configuration = _configuration
46+
self.discriminator = None
47+
48+
def to_dict(self):
49+
"""Returns the model properties as a dict"""
50+
result = {}
51+
52+
for attr, _ in six.iteritems(self.swagger_types):
53+
value = getattr(self, attr)
54+
if isinstance(value, list):
55+
result[attr] = list(map(
56+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
57+
value
58+
))
59+
elif hasattr(value, "to_dict"):
60+
result[attr] = value.to_dict()
61+
elif isinstance(value, dict):
62+
result[attr] = dict(map(
63+
lambda item: (item[0], item[1].to_dict())
64+
if hasattr(item[1], "to_dict") else item,
65+
value.items()
66+
))
67+
else:
68+
result[attr] = value
69+
if issubclass(CreateSecretOrderResponse, dict):
70+
for key, value in self.items():
71+
result[key] = value
72+
73+
return result
74+
75+
def to_str(self):
76+
"""Returns the string representation of the model"""
77+
return pprint.pformat(self.to_dict())
78+
79+
def __repr__(self):
80+
"""For `print` and `pprint`"""
81+
return self.to_str()
82+
83+
def __eq__(self, other):
84+
"""Returns true if both objects are equal"""
85+
if not isinstance(other, CreateSecretOrderResponse):
86+
return False
87+
88+
return self.to_dict() == other.to_dict()
89+
90+
def __ne__(self, other):
91+
"""Returns true if both objects are not equal"""
92+
if not isinstance(other, CreateSecretOrderResponse):
93+
return True
94+
95+
return self.to_dict() != other.to_dict()

0 commit comments

Comments
 (0)