Skip to content

Commit 1c7dc41

Browse files
author
BitsAdmin
committed
Merge branch 'kms-Python-2021-02-18-online-917-2025_01_06_14_58_48' into 'integration_2025-01-09_670215300610'
feat: [development task] kms-917-Python (964718) See merge request iaasng/volcengine-python-sdk!482
2 parents 1dbf5ed + 4267c75 commit 1c7dc41

25 files changed

+670
-213
lines changed

volcenginesdkkms/api/kms_api.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,13 @@ def archive_key_with_http_info(self, body, **kwargs): # noqa: E501
109109

110110
# HTTP header `Content-Type`
111111
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
112-
['application/json']) # noqa: E501
112+
['text/plain']) # noqa: E501
113113

114114
# Authentication setting
115115
auth_settings = ['volcengineSign'] # noqa: E501
116116

117117
return self.api_client.call_api(
118-
'/ArchiveKey/2021-02-18/kms/post/application_json/', 'POST',
118+
'/ArchiveKey/2021-02-18/kms/get/text_plain/', 'GET',
119119
path_params,
120120
query_params,
121121
header_params,
@@ -2437,13 +2437,13 @@ def disable_key_rotation_with_http_info(self, body, **kwargs): # noqa: E501
24372437

24382438
# HTTP header `Content-Type`
24392439
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
2440-
['application/json']) # noqa: E501
2440+
['text/plain']) # noqa: E501
24412441

24422442
# Authentication setting
24432443
auth_settings = ['volcengineSign'] # noqa: E501
24442444

24452445
return self.api_client.call_api(
2446-
'/DisableKeyRotation/2021-02-18/kms/post/application_json/', 'POST',
2446+
'/DisableKeyRotation/2021-02-18/kms/get/text_plain/', 'GET',
24472447
path_params,
24482448
query_params,
24492449
header_params,
@@ -2534,13 +2534,13 @@ def enable_key_with_http_info(self, body, **kwargs): # noqa: E501
25342534

25352535
# HTTP header `Content-Type`
25362536
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
2537-
['application/json']) # noqa: E501
2537+
['text/plain']) # noqa: E501
25382538

25392539
# Authentication setting
25402540
auth_settings = ['volcengineSign'] # noqa: E501
25412541

25422542
return self.api_client.call_api(
2543-
'/EnableKey/2021-02-18/kms/post/application_json/', 'POST',
2543+
'/EnableKey/2021-02-18/kms/get/text_plain/', 'GET',
25442544
path_params,
25452545
query_params,
25462546
header_params,
@@ -3407,13 +3407,13 @@ def query_keyring_with_http_info(self, body, **kwargs): # noqa: E501
34073407

34083408
# HTTP header `Content-Type`
34093409
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
3410-
['application/json']) # noqa: E501
3410+
['text/plain']) # noqa: E501
34113411

34123412
# Authentication setting
34133413
auth_settings = ['volcengineSign'] # noqa: E501
34143414

34153415
return self.api_client.call_api(
3416-
'/QueryKeyring/2021-02-18/kms/post/application_json/', 'POST',
3416+
'/QueryKeyring/2021-02-18/kms/get/text_plain/', 'GET',
34173417
path_params,
34183418
query_params,
34193419
header_params,
@@ -4183,13 +4183,13 @@ def update_keyring_with_http_info(self, body, **kwargs): # noqa: E501
41834183

41844184
# HTTP header `Content-Type`
41854185
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
4186-
['application/json']) # noqa: E501
4186+
['text/plain']) # noqa: E501
41874187

41884188
# Authentication setting
41894189
auth_settings = ['volcengineSign'] # noqa: E501
41904190

41914191
return self.api_client.call_api(
4192-
'/UpdateKeyring/2021-02-18/kms/post/application_json/', 'POST',
4192+
'/UpdateKeyring/2021-02-18/kms/get/text_plain/', 'GET',
41934193
path_params,
41944194
query_params,
41954195
header_params,

volcenginesdkkms/models/archive_key_request.py

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,27 +33,55 @@ class ArchiveKeyRequest(object):
3333
and the value is json key in definition.
3434
"""
3535
swagger_types = {
36+
'key_id': 'str',
3637
'key_name': 'str',
3738
'keyring_name': 'str'
3839
}
3940

4041
attribute_map = {
42+
'key_id': 'KeyID',
4143
'key_name': 'KeyName',
4244
'keyring_name': 'KeyringName'
4345
}
4446

45-
def __init__(self, key_name=None, keyring_name=None, _configuration=None): # noqa: E501
47+
def __init__(self, key_id=None, key_name=None, keyring_name=None, _configuration=None): # noqa: E501
4648
"""ArchiveKeyRequest - a model defined in Swagger""" # noqa: E501
4749
if _configuration is None:
4850
_configuration = Configuration()
4951
self._configuration = _configuration
5052

53+
self._key_id = None
5154
self._key_name = None
5255
self._keyring_name = None
5356
self.discriminator = None
5457

55-
self.key_name = key_name
56-
self.keyring_name = keyring_name
58+
if key_id is not None:
59+
self.key_id = key_id
60+
if key_name is not None:
61+
self.key_name = key_name
62+
if keyring_name is not None:
63+
self.keyring_name = keyring_name
64+
65+
@property
66+
def key_id(self):
67+
"""Gets the key_id of this ArchiveKeyRequest. # noqa: E501
68+
69+
70+
:return: The key_id of this ArchiveKeyRequest. # noqa: E501
71+
:rtype: str
72+
"""
73+
return self._key_id
74+
75+
@key_id.setter
76+
def key_id(self, key_id):
77+
"""Sets the key_id of this ArchiveKeyRequest.
78+
79+
80+
:param key_id: The key_id of this ArchiveKeyRequest. # noqa: E501
81+
:type: str
82+
"""
83+
84+
self._key_id = key_id
5785

5886
@property
5987
def key_name(self):
@@ -73,8 +101,6 @@ def key_name(self, key_name):
73101
:param key_name: The key_name of this ArchiveKeyRequest. # noqa: E501
74102
:type: str
75103
"""
76-
if self._configuration.client_side_validation and key_name is None:
77-
raise ValueError("Invalid value for `key_name`, must not be `None`") # noqa: E501
78104
if (self._configuration.client_side_validation and
79105
key_name is not None and len(key_name) > 31):
80106
raise ValueError("Invalid value for `key_name`, length must be less than or equal to `31`") # noqa: E501
@@ -102,8 +128,6 @@ def keyring_name(self, keyring_name):
102128
:param keyring_name: The keyring_name of this ArchiveKeyRequest. # noqa: E501
103129
:type: str
104130
"""
105-
if self._configuration.client_side_validation and keyring_name is None:
106-
raise ValueError("Invalid value for `keyring_name`, must not be `None`") # noqa: E501
107131
if (self._configuration.client_side_validation and
108132
keyring_name is not None and len(keyring_name) > 31):
109133
raise ValueError("Invalid value for `keyring_name`, length must be less than or equal to `31`") # noqa: E501

volcenginesdkkms/models/asymmetric_encrypt_request.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ def plaintext(self, plaintext):
189189
if self._configuration.client_side_validation and plaintext is None:
190190
raise ValueError("Invalid value for `plaintext`, must not be `None`") # noqa: E501
191191
if (self._configuration.client_side_validation and
192-
plaintext is not None and len(plaintext) > 4096):
193-
raise ValueError("Invalid value for `plaintext`, length must be less than or equal to `4096`") # noqa: E501
192+
plaintext is not None and len(plaintext) > 1024):
193+
raise ValueError("Invalid value for `plaintext`, length must be less than or equal to `1024`") # noqa: E501
194194
if (self._configuration.client_side_validation and
195195
plaintext is not None and len(plaintext) < 1):
196196
raise ValueError("Invalid value for `plaintext`, length must be greater than or equal to `1`") # noqa: E501

volcenginesdkkms/models/cancel_archive_key_request.py

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,27 +33,55 @@ class CancelArchiveKeyRequest(object):
3333
and the value is json key in definition.
3434
"""
3535
swagger_types = {
36+
'key_id': 'str',
3637
'key_name': 'str',
3738
'keyring_name': 'str'
3839
}
3940

4041
attribute_map = {
42+
'key_id': 'KeyID',
4143
'key_name': 'KeyName',
4244
'keyring_name': 'KeyringName'
4345
}
4446

45-
def __init__(self, key_name=None, keyring_name=None, _configuration=None): # noqa: E501
47+
def __init__(self, key_id=None, key_name=None, keyring_name=None, _configuration=None): # noqa: E501
4648
"""CancelArchiveKeyRequest - a model defined in Swagger""" # noqa: E501
4749
if _configuration is None:
4850
_configuration = Configuration()
4951
self._configuration = _configuration
5052

53+
self._key_id = None
5154
self._key_name = None
5255
self._keyring_name = None
5356
self.discriminator = None
5457

55-
self.key_name = key_name
56-
self.keyring_name = keyring_name
58+
if key_id is not None:
59+
self.key_id = key_id
60+
if key_name is not None:
61+
self.key_name = key_name
62+
if keyring_name is not None:
63+
self.keyring_name = keyring_name
64+
65+
@property
66+
def key_id(self):
67+
"""Gets the key_id of this CancelArchiveKeyRequest. # noqa: E501
68+
69+
70+
:return: The key_id of this CancelArchiveKeyRequest. # noqa: E501
71+
:rtype: str
72+
"""
73+
return self._key_id
74+
75+
@key_id.setter
76+
def key_id(self, key_id):
77+
"""Sets the key_id of this CancelArchiveKeyRequest.
78+
79+
80+
:param key_id: The key_id of this CancelArchiveKeyRequest. # noqa: E501
81+
:type: str
82+
"""
83+
84+
self._key_id = key_id
5785

5886
@property
5987
def key_name(self):
@@ -73,8 +101,6 @@ def key_name(self, key_name):
73101
:param key_name: The key_name of this CancelArchiveKeyRequest. # noqa: E501
74102
:type: str
75103
"""
76-
if self._configuration.client_side_validation and key_name is None:
77-
raise ValueError("Invalid value for `key_name`, must not be `None`") # noqa: E501
78104
if (self._configuration.client_side_validation and
79105
key_name is not None and len(key_name) > 31):
80106
raise ValueError("Invalid value for `key_name`, length must be less than or equal to `31`") # noqa: E501
@@ -102,8 +128,6 @@ def keyring_name(self, keyring_name):
102128
:param keyring_name: The keyring_name of this CancelArchiveKeyRequest. # noqa: E501
103129
:type: str
104130
"""
105-
if self._configuration.client_side_validation and keyring_name is None:
106-
raise ValueError("Invalid value for `keyring_name`, must not be `None`") # noqa: E501
107131
if (self._configuration.client_side_validation and
108132
keyring_name is not None and len(keyring_name) > 31):
109133
raise ValueError("Invalid value for `keyring_name`, length must be less than or equal to `31`") # noqa: E501

volcenginesdkkms/models/cancel_key_deletion_request.py

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,27 +33,55 @@ class CancelKeyDeletionRequest(object):
3333
and the value is json key in definition.
3434
"""
3535
swagger_types = {
36+
'key_id': 'str',
3637
'key_name': 'str',
3738
'keyring_name': 'str'
3839
}
3940

4041
attribute_map = {
42+
'key_id': 'KeyID',
4143
'key_name': 'KeyName',
4244
'keyring_name': 'KeyringName'
4345
}
4446

45-
def __init__(self, key_name=None, keyring_name=None, _configuration=None): # noqa: E501
47+
def __init__(self, key_id=None, key_name=None, keyring_name=None, _configuration=None): # noqa: E501
4648
"""CancelKeyDeletionRequest - a model defined in Swagger""" # noqa: E501
4749
if _configuration is None:
4850
_configuration = Configuration()
4951
self._configuration = _configuration
5052

53+
self._key_id = None
5154
self._key_name = None
5255
self._keyring_name = None
5356
self.discriminator = None
5457

55-
self.key_name = key_name
56-
self.keyring_name = keyring_name
58+
if key_id is not None:
59+
self.key_id = key_id
60+
if key_name is not None:
61+
self.key_name = key_name
62+
if keyring_name is not None:
63+
self.keyring_name = keyring_name
64+
65+
@property
66+
def key_id(self):
67+
"""Gets the key_id of this CancelKeyDeletionRequest. # noqa: E501
68+
69+
70+
:return: The key_id of this CancelKeyDeletionRequest. # noqa: E501
71+
:rtype: str
72+
"""
73+
return self._key_id
74+
75+
@key_id.setter
76+
def key_id(self, key_id):
77+
"""Sets the key_id of this CancelKeyDeletionRequest.
78+
79+
80+
:param key_id: The key_id of this CancelKeyDeletionRequest. # noqa: E501
81+
:type: str
82+
"""
83+
84+
self._key_id = key_id
5785

5886
@property
5987
def key_name(self):
@@ -73,8 +101,6 @@ def key_name(self, key_name):
73101
:param key_name: The key_name of this CancelKeyDeletionRequest. # noqa: E501
74102
:type: str
75103
"""
76-
if self._configuration.client_side_validation and key_name is None:
77-
raise ValueError("Invalid value for `key_name`, must not be `None`") # noqa: E501
78104
if (self._configuration.client_side_validation and
79105
key_name is not None and len(key_name) > 31):
80106
raise ValueError("Invalid value for `key_name`, length must be less than or equal to `31`") # noqa: E501
@@ -102,8 +128,6 @@ def keyring_name(self, keyring_name):
102128
:param keyring_name: The keyring_name of this CancelKeyDeletionRequest. # noqa: E501
103129
:type: str
104130
"""
105-
if self._configuration.client_side_validation and keyring_name is None:
106-
raise ValueError("Invalid value for `keyring_name`, must not be `None`") # noqa: E501
107131
if (self._configuration.client_side_validation and
108132
keyring_name is not None and len(keyring_name) > 31):
109133
raise ValueError("Invalid value for `keyring_name`, length must be less than or equal to `31`") # noqa: E501

volcenginesdkkms/models/delete_key_material_request.py

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,27 +33,55 @@ class DeleteKeyMaterialRequest(object):
3333
and the value is json key in definition.
3434
"""
3535
swagger_types = {
36+
'key_id': 'str',
3637
'key_name': 'str',
3738
'keyring_name': 'str'
3839
}
3940

4041
attribute_map = {
42+
'key_id': 'KeyID',
4143
'key_name': 'KeyName',
4244
'keyring_name': 'KeyringName'
4345
}
4446

45-
def __init__(self, key_name=None, keyring_name=None, _configuration=None): # noqa: E501
47+
def __init__(self, key_id=None, key_name=None, keyring_name=None, _configuration=None): # noqa: E501
4648
"""DeleteKeyMaterialRequest - a model defined in Swagger""" # noqa: E501
4749
if _configuration is None:
4850
_configuration = Configuration()
4951
self._configuration = _configuration
5052

53+
self._key_id = None
5154
self._key_name = None
5255
self._keyring_name = None
5356
self.discriminator = None
5457

55-
self.key_name = key_name
56-
self.keyring_name = keyring_name
58+
if key_id is not None:
59+
self.key_id = key_id
60+
if key_name is not None:
61+
self.key_name = key_name
62+
if keyring_name is not None:
63+
self.keyring_name = keyring_name
64+
65+
@property
66+
def key_id(self):
67+
"""Gets the key_id of this DeleteKeyMaterialRequest. # noqa: E501
68+
69+
70+
:return: The key_id of this DeleteKeyMaterialRequest. # noqa: E501
71+
:rtype: str
72+
"""
73+
return self._key_id
74+
75+
@key_id.setter
76+
def key_id(self, key_id):
77+
"""Sets the key_id of this DeleteKeyMaterialRequest.
78+
79+
80+
:param key_id: The key_id of this DeleteKeyMaterialRequest. # noqa: E501
81+
:type: str
82+
"""
83+
84+
self._key_id = key_id
5785

5886
@property
5987
def key_name(self):
@@ -73,8 +101,6 @@ def key_name(self, key_name):
73101
:param key_name: The key_name of this DeleteKeyMaterialRequest. # noqa: E501
74102
:type: str
75103
"""
76-
if self._configuration.client_side_validation and key_name is None:
77-
raise ValueError("Invalid value for `key_name`, must not be `None`") # noqa: E501
78104
if (self._configuration.client_side_validation and
79105
key_name is not None and len(key_name) > 31):
80106
raise ValueError("Invalid value for `key_name`, length must be less than or equal to `31`") # noqa: E501
@@ -102,8 +128,6 @@ def keyring_name(self, keyring_name):
102128
:param keyring_name: The keyring_name of this DeleteKeyMaterialRequest. # noqa: E501
103129
:type: str
104130
"""
105-
if self._configuration.client_side_validation and keyring_name is None:
106-
raise ValueError("Invalid value for `keyring_name`, must not be `None`") # noqa: E501
107131
if (self._configuration.client_side_validation and
108132
keyring_name is not None and len(keyring_name) > 31):
109133
raise ValueError("Invalid value for `keyring_name`, length must be less than or equal to `31`") # noqa: E501

0 commit comments

Comments
 (0)