Skip to content

Commit a557af9

Browse files
author
BitsAdmin
committed
Merge branch 'kms-Python-2021-02-18-online-1087-2025_04_03_09_39_24' into 'integration_2025-04-17_865081244162'
feat: [development task] kms-1087-Python (1163177) See merge request iaasng/volcengine-python-sdk!570
2 parents debae55 + eb48f3b commit a557af9

26 files changed

+2997
-17
lines changed

volcenginesdkkms/__init__.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@
9494
from volcenginesdkkms.models.keyring_for_create_keyring_output import KeyringForCreateKeyringOutput
9595
from volcenginesdkkms.models.keyring_for_describe_keyrings_output import KeyringForDescribeKeyringsOutput
9696
from volcenginesdkkms.models.keyring_for_query_keyring_output import KeyringForQueryKeyringOutput
97+
from volcenginesdkkms.models.list_tags_for_resources_request import ListTagsForResourcesRequest
98+
from volcenginesdkkms.models.list_tags_for_resources_response import ListTagsForResourcesResponse
9799
from volcenginesdkkms.models.multi_region_configuration_for_create_key_output import MultiRegionConfigurationForCreateKeyOutput
98100
from volcenginesdkkms.models.multi_region_configuration_for_describe_key_output import MultiRegionConfigurationForDescribeKeyOutput
99101
from volcenginesdkkms.models.multi_region_configuration_for_describe_keys_output import MultiRegionConfigurationForDescribeKeysOutput
@@ -117,6 +119,7 @@
117119
from volcenginesdkkms.models.replica_key_for_replicate_key_output import ReplicaKeyForReplicateKeyOutput
118120
from volcenginesdkkms.models.replicate_key_request import ReplicateKeyRequest
119121
from volcenginesdkkms.models.replicate_key_response import ReplicateKeyResponse
122+
from volcenginesdkkms.models.resource_tag_for_list_tags_for_resources_output import ResourceTagForListTagsForResourcesOutput
120123
from volcenginesdkkms.models.restore_secret_request import RestoreSecretRequest
121124
from volcenginesdkkms.models.restore_secret_response import RestoreSecretResponse
122125
from volcenginesdkkms.models.rotate_secret_request import RotateSecretRequest
@@ -132,6 +135,19 @@
132135
from volcenginesdkkms.models.secret_version_for_describe_secret_versions_output import SecretVersionForDescribeSecretVersionsOutput
133136
from volcenginesdkkms.models.set_secret_value_request import SetSecretValueRequest
134137
from volcenginesdkkms.models.set_secret_value_response import SetSecretValueResponse
138+
from volcenginesdkkms.models.tag_filter_for_describe_keys_input import TagFilterForDescribeKeysInput
139+
from volcenginesdkkms.models.tag_filter_for_list_tags_for_resources_input import TagFilterForListTagsForResourcesInput
140+
from volcenginesdkkms.models.tag_for_create_key_input import TagForCreateKeyInput
141+
from volcenginesdkkms.models.tag_for_create_key_output import TagForCreateKeyOutput
142+
from volcenginesdkkms.models.tag_for_describe_key_output import TagForDescribeKeyOutput
143+
from volcenginesdkkms.models.tag_for_describe_keys_output import TagForDescribeKeysOutput
144+
from volcenginesdkkms.models.tag_for_replicate_key_input import TagForReplicateKeyInput
145+
from volcenginesdkkms.models.tag_for_replicate_key_output import TagForReplicateKeyOutput
146+
from volcenginesdkkms.models.tag_for_tag_resources_input import TagForTagResourcesInput
147+
from volcenginesdkkms.models.tag_resources_request import TagResourcesRequest
148+
from volcenginesdkkms.models.tag_resources_response import TagResourcesResponse
149+
from volcenginesdkkms.models.untag_resources_request import UntagResourcesRequest
150+
from volcenginesdkkms.models.untag_resources_response import UntagResourcesResponse
135151
from volcenginesdkkms.models.update_key_request import UpdateKeyRequest
136152
from volcenginesdkkms.models.update_key_response import UpdateKeyResponse
137153
from volcenginesdkkms.models.update_keyring_request import UpdateKeyringRequest

volcenginesdkkms/api/kms_api.py

Lines changed: 295 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3331,6 +3331,103 @@ def import_key_material_with_http_info(self, body, **kwargs): # noqa: E501
33313331
_request_timeout=params.get('_request_timeout'),
33323332
collection_formats=collection_formats)
33333333

3334+
def list_tags_for_resources(self, body, **kwargs): # noqa: E501
3335+
"""list_tags_for_resources # noqa: E501
3336+
3337+
This method makes a synchronous HTTP request by default. To make an
3338+
asynchronous HTTP request, please pass async_req=True
3339+
>>> thread = api.list_tags_for_resources(body, async_req=True)
3340+
>>> result = thread.get()
3341+
3342+
:param async_req bool
3343+
:param ListTagsForResourcesRequest body: (required)
3344+
:return: ListTagsForResourcesResponse
3345+
If the method is called asynchronously,
3346+
returns the request thread.
3347+
"""
3348+
kwargs['_return_http_data_only'] = True
3349+
if kwargs.get('async_req'):
3350+
return self.list_tags_for_resources_with_http_info(body, **kwargs) # noqa: E501
3351+
else:
3352+
(data) = self.list_tags_for_resources_with_http_info(body, **kwargs) # noqa: E501
3353+
return data
3354+
3355+
def list_tags_for_resources_with_http_info(self, body, **kwargs): # noqa: E501
3356+
"""list_tags_for_resources # noqa: E501
3357+
3358+
This method makes a synchronous HTTP request by default. To make an
3359+
asynchronous HTTP request, please pass async_req=True
3360+
>>> thread = api.list_tags_for_resources_with_http_info(body, async_req=True)
3361+
>>> result = thread.get()
3362+
3363+
:param async_req bool
3364+
:param ListTagsForResourcesRequest body: (required)
3365+
:return: ListTagsForResourcesResponse
3366+
If the method is called asynchronously,
3367+
returns the request thread.
3368+
"""
3369+
3370+
all_params = ['body'] # noqa: E501
3371+
all_params.append('async_req')
3372+
all_params.append('_return_http_data_only')
3373+
all_params.append('_preload_content')
3374+
all_params.append('_request_timeout')
3375+
3376+
params = locals()
3377+
for key, val in six.iteritems(params['kwargs']):
3378+
if key not in all_params:
3379+
raise TypeError(
3380+
"Got an unexpected keyword argument '%s'"
3381+
" to method list_tags_for_resources" % key
3382+
)
3383+
params[key] = val
3384+
del params['kwargs']
3385+
# verify the required parameter 'body' is set
3386+
if self.api_client.client_side_validation and ('body' not in params or
3387+
params['body'] is None): # noqa: E501
3388+
raise ValueError("Missing the required parameter `body` when calling `list_tags_for_resources`") # noqa: E501
3389+
3390+
collection_formats = {}
3391+
3392+
path_params = {}
3393+
3394+
query_params = []
3395+
3396+
header_params = {}
3397+
3398+
form_params = []
3399+
local_var_files = {}
3400+
3401+
body_params = None
3402+
if 'body' in params:
3403+
body_params = params['body']
3404+
# HTTP header `Accept`
3405+
header_params['Accept'] = self.api_client.select_header_accept(
3406+
['application/json']) # noqa: E501
3407+
3408+
# HTTP header `Content-Type`
3409+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
3410+
['application/json']) # noqa: E501
3411+
3412+
# Authentication setting
3413+
auth_settings = ['volcengineSign'] # noqa: E501
3414+
3415+
return self.api_client.call_api(
3416+
'/ListTagsForResources/2021-02-18/kms/post/application_json/', 'POST',
3417+
path_params,
3418+
query_params,
3419+
header_params,
3420+
body=body_params,
3421+
post_params=form_params,
3422+
files=local_var_files,
3423+
response_type='ListTagsForResourcesResponse', # noqa: E501
3424+
auth_settings=auth_settings,
3425+
async_req=params.get('async_req'),
3426+
_return_http_data_only=params.get('_return_http_data_only'),
3427+
_preload_content=params.get('_preload_content', True),
3428+
_request_timeout=params.get('_request_timeout'),
3429+
collection_formats=collection_formats)
3430+
33343431
def query_keyring(self, body, **kwargs): # noqa: E501
33353432
"""query_keyring # noqa: E501
33363433
@@ -3601,13 +3698,13 @@ def replicate_key_with_http_info(self, body, **kwargs): # noqa: E501
36013698

36023699
# HTTP header `Content-Type`
36033700
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
3604-
['text/plain']) # noqa: E501
3701+
['application/json']) # noqa: E501
36053702

36063703
# Authentication setting
36073704
auth_settings = ['volcengineSign'] # noqa: E501
36083705

36093706
return self.api_client.call_api(
3610-
'/ReplicateKey/2021-02-18/kms/get/text_plain/', 'GET',
3707+
'/ReplicateKey/2021-02-18/kms/post/application_json/', 'POST',
36113708
path_params,
36123709
query_params,
36133710
header_params,
@@ -4107,6 +4204,200 @@ def set_secret_value_with_http_info(self, body, **kwargs): # noqa: E501
41074204
_request_timeout=params.get('_request_timeout'),
41084205
collection_formats=collection_formats)
41094206

4207+
def tag_resources(self, body, **kwargs): # noqa: E501
4208+
"""tag_resources # noqa: E501
4209+
4210+
This method makes a synchronous HTTP request by default. To make an
4211+
asynchronous HTTP request, please pass async_req=True
4212+
>>> thread = api.tag_resources(body, async_req=True)
4213+
>>> result = thread.get()
4214+
4215+
:param async_req bool
4216+
:param TagResourcesRequest body: (required)
4217+
:return: TagResourcesResponse
4218+
If the method is called asynchronously,
4219+
returns the request thread.
4220+
"""
4221+
kwargs['_return_http_data_only'] = True
4222+
if kwargs.get('async_req'):
4223+
return self.tag_resources_with_http_info(body, **kwargs) # noqa: E501
4224+
else:
4225+
(data) = self.tag_resources_with_http_info(body, **kwargs) # noqa: E501
4226+
return data
4227+
4228+
def tag_resources_with_http_info(self, body, **kwargs): # noqa: E501
4229+
"""tag_resources # noqa: E501
4230+
4231+
This method makes a synchronous HTTP request by default. To make an
4232+
asynchronous HTTP request, please pass async_req=True
4233+
>>> thread = api.tag_resources_with_http_info(body, async_req=True)
4234+
>>> result = thread.get()
4235+
4236+
:param async_req bool
4237+
:param TagResourcesRequest body: (required)
4238+
:return: TagResourcesResponse
4239+
If the method is called asynchronously,
4240+
returns the request thread.
4241+
"""
4242+
4243+
all_params = ['body'] # noqa: E501
4244+
all_params.append('async_req')
4245+
all_params.append('_return_http_data_only')
4246+
all_params.append('_preload_content')
4247+
all_params.append('_request_timeout')
4248+
4249+
params = locals()
4250+
for key, val in six.iteritems(params['kwargs']):
4251+
if key not in all_params:
4252+
raise TypeError(
4253+
"Got an unexpected keyword argument '%s'"
4254+
" to method tag_resources" % key
4255+
)
4256+
params[key] = val
4257+
del params['kwargs']
4258+
# verify the required parameter 'body' is set
4259+
if self.api_client.client_side_validation and ('body' not in params or
4260+
params['body'] is None): # noqa: E501
4261+
raise ValueError("Missing the required parameter `body` when calling `tag_resources`") # noqa: E501
4262+
4263+
collection_formats = {}
4264+
4265+
path_params = {}
4266+
4267+
query_params = []
4268+
4269+
header_params = {}
4270+
4271+
form_params = []
4272+
local_var_files = {}
4273+
4274+
body_params = None
4275+
if 'body' in params:
4276+
body_params = params['body']
4277+
# HTTP header `Accept`
4278+
header_params['Accept'] = self.api_client.select_header_accept(
4279+
['application/json']) # noqa: E501
4280+
4281+
# HTTP header `Content-Type`
4282+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
4283+
['application/json']) # noqa: E501
4284+
4285+
# Authentication setting
4286+
auth_settings = ['volcengineSign'] # noqa: E501
4287+
4288+
return self.api_client.call_api(
4289+
'/TagResources/2021-02-18/kms/post/application_json/', 'POST',
4290+
path_params,
4291+
query_params,
4292+
header_params,
4293+
body=body_params,
4294+
post_params=form_params,
4295+
files=local_var_files,
4296+
response_type='TagResourcesResponse', # noqa: E501
4297+
auth_settings=auth_settings,
4298+
async_req=params.get('async_req'),
4299+
_return_http_data_only=params.get('_return_http_data_only'),
4300+
_preload_content=params.get('_preload_content', True),
4301+
_request_timeout=params.get('_request_timeout'),
4302+
collection_formats=collection_formats)
4303+
4304+
def untag_resources(self, body, **kwargs): # noqa: E501
4305+
"""untag_resources # noqa: E501
4306+
4307+
This method makes a synchronous HTTP request by default. To make an
4308+
asynchronous HTTP request, please pass async_req=True
4309+
>>> thread = api.untag_resources(body, async_req=True)
4310+
>>> result = thread.get()
4311+
4312+
:param async_req bool
4313+
:param UntagResourcesRequest body: (required)
4314+
:return: UntagResourcesResponse
4315+
If the method is called asynchronously,
4316+
returns the request thread.
4317+
"""
4318+
kwargs['_return_http_data_only'] = True
4319+
if kwargs.get('async_req'):
4320+
return self.untag_resources_with_http_info(body, **kwargs) # noqa: E501
4321+
else:
4322+
(data) = self.untag_resources_with_http_info(body, **kwargs) # noqa: E501
4323+
return data
4324+
4325+
def untag_resources_with_http_info(self, body, **kwargs): # noqa: E501
4326+
"""untag_resources # noqa: E501
4327+
4328+
This method makes a synchronous HTTP request by default. To make an
4329+
asynchronous HTTP request, please pass async_req=True
4330+
>>> thread = api.untag_resources_with_http_info(body, async_req=True)
4331+
>>> result = thread.get()
4332+
4333+
:param async_req bool
4334+
:param UntagResourcesRequest body: (required)
4335+
:return: UntagResourcesResponse
4336+
If the method is called asynchronously,
4337+
returns the request thread.
4338+
"""
4339+
4340+
all_params = ['body'] # noqa: E501
4341+
all_params.append('async_req')
4342+
all_params.append('_return_http_data_only')
4343+
all_params.append('_preload_content')
4344+
all_params.append('_request_timeout')
4345+
4346+
params = locals()
4347+
for key, val in six.iteritems(params['kwargs']):
4348+
if key not in all_params:
4349+
raise TypeError(
4350+
"Got an unexpected keyword argument '%s'"
4351+
" to method untag_resources" % key
4352+
)
4353+
params[key] = val
4354+
del params['kwargs']
4355+
# verify the required parameter 'body' is set
4356+
if self.api_client.client_side_validation and ('body' not in params or
4357+
params['body'] is None): # noqa: E501
4358+
raise ValueError("Missing the required parameter `body` when calling `untag_resources`") # noqa: E501
4359+
4360+
collection_formats = {}
4361+
4362+
path_params = {}
4363+
4364+
query_params = []
4365+
4366+
header_params = {}
4367+
4368+
form_params = []
4369+
local_var_files = {}
4370+
4371+
body_params = None
4372+
if 'body' in params:
4373+
body_params = params['body']
4374+
# HTTP header `Accept`
4375+
header_params['Accept'] = self.api_client.select_header_accept(
4376+
['application/json']) # noqa: E501
4377+
4378+
# HTTP header `Content-Type`
4379+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
4380+
['application/json']) # noqa: E501
4381+
4382+
# Authentication setting
4383+
auth_settings = ['volcengineSign'] # noqa: E501
4384+
4385+
return self.api_client.call_api(
4386+
'/UntagResources/2021-02-18/kms/post/application_json/', 'POST',
4387+
path_params,
4388+
query_params,
4389+
header_params,
4390+
body=body_params,
4391+
post_params=form_params,
4392+
files=local_var_files,
4393+
response_type='UntagResourcesResponse', # noqa: E501
4394+
auth_settings=auth_settings,
4395+
async_req=params.get('async_req'),
4396+
_return_http_data_only=params.get('_return_http_data_only'),
4397+
_preload_content=params.get('_preload_content', True),
4398+
_request_timeout=params.get('_request_timeout'),
4399+
collection_formats=collection_formats)
4400+
41104401
def update_key(self, body, **kwargs): # noqa: E501
41114402
"""update_key # noqa: E501
41124403
@@ -4377,13 +4668,13 @@ def update_primary_region_with_http_info(self, body, **kwargs): # noqa: E501
43774668

43784669
# HTTP header `Content-Type`
43794670
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
4380-
['text/plain']) # noqa: E501
4671+
['application/json']) # noqa: E501
43814672

43824673
# Authentication setting
43834674
auth_settings = ['volcengineSign'] # noqa: E501
43844675

43854676
return self.api_client.call_api(
4386-
'/UpdatePrimaryRegion/2021-02-18/kms/get/text_plain/', 'GET',
4677+
'/UpdatePrimaryRegion/2021-02-18/kms/post/application_json/', 'POST',
43874678
path_params,
43884679
query_params,
43894680
header_params,

0 commit comments

Comments
 (0)