Set UpdateKeyRequest as mandatory

This commit is contained in:
Quentin 2022-09-14 15:51:21 +02:00
parent a015827776
commit 2b9d8df0c0
Signed by: quentin
GPG key ID: E9602264D639FF68
3 changed files with 11 additions and 16 deletions

2
garage

@ -1 +1 @@
Subproject commit 008119e1ba24f19f8f8fdaec7a451b209ef56a12 Subproject commit ba6792231072c32f4de3cd2cec0788c55e7de6c0

View file

@ -486,7 +486,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **update_key** # **update_key**
> KeyInfo update_key(access_key) > KeyInfo update_key(access_key, update_key_request)
Update a key Update a key
@ -532,21 +532,12 @@ with garage_admin_sdk.ApiClient(configuration) as api_client:
deny=UpdateKeyRequestDeny( deny=UpdateKeyRequestDeny(
create_bucket=True, create_bucket=True,
), ),
) # UpdateKeyRequest | For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove (optional) ) # UpdateKeyRequest | For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove
# example passing only required values which don't have defaults set # example passing only required values which don't have defaults set
try: try:
# Update a key # Update a key
api_response = api_instance.update_key(access_key) api_response = api_instance.update_key(access_key, update_key_request)
pprint(api_response)
except garage_admin_sdk.ApiException as e:
print("Exception when calling KeyApi->update_key: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Update a key
api_response = api_instance.update_key(access_key, update_key_request=update_key_request)
pprint(api_response) pprint(api_response)
except garage_admin_sdk.ApiException as e: except garage_admin_sdk.ApiException as e:
print("Exception when calling KeyApi->update_key: %s\n" % e) print("Exception when calling KeyApi->update_key: %s\n" % e)
@ -558,7 +549,7 @@ with garage_admin_sdk.ApiClient(configuration) as api_client:
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**access_key** | **str**| The exact API access key generated by Garage | **access_key** | **str**| The exact API access key generated by Garage |
**update_key_request** | [**UpdateKeyRequest**](UpdateKeyRequest.md)| For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove | [optional] **update_key_request** | [**UpdateKeyRequest**](UpdateKeyRequest.md)| For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove |
### Return type ### Return type

View file

@ -356,6 +356,7 @@ class KeyApi(object):
], ],
'required': [ 'required': [
'access_key', 'access_key',
'update_key_request',
], ],
'nullable': [ 'nullable': [
], ],
@ -892,6 +893,7 @@ class KeyApi(object):
def update_key( def update_key(
self, self,
access_key, access_key,
update_key_request,
**kwargs **kwargs
): ):
"""Update a key # noqa: E501 """Update a key # noqa: E501
@ -900,14 +902,14 @@ class KeyApi(object):
This method makes a synchronous HTTP request by default. To make an This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_key(access_key, async_req=True) >>> thread = api.update_key(access_key, update_key_request, async_req=True)
>>> result = thread.get() >>> result = thread.get()
Args: Args:
access_key (str): The exact API access key generated by Garage access_key (str): The exact API access key generated by Garage
update_key_request (UpdateKeyRequest): For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove
Keyword Args: Keyword Args:
update_key_request (UpdateKeyRequest): For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove . [optional]
_return_http_data_only (bool): response data without head status _return_http_data_only (bool): response data without head status
code and headers. Default is True. code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object _preload_content (bool): if False, the urllib3.HTTPResponse object
@ -971,5 +973,7 @@ class KeyApi(object):
kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['_request_auths'] = kwargs.get('_request_auths', None)
kwargs['access_key'] = \ kwargs['access_key'] = \
access_key access_key
kwargs['update_key_request'] = \
update_key_request
return self.update_key_endpoint.call_with_http_info(**kwargs) return self.update_key_endpoint.call_with_http_info(**kwargs)