github.com/treeverse/lakefs@v1.24.1-0.20240520134607-95648127bfb0/clients/python/lakefs_sdk/api/auth_api.py (about) 1 # coding: utf-8 2 3 """ 4 lakeFS API 5 6 lakeFS HTTP API 7 8 The version of the OpenAPI document: 1.0.0 9 Contact: services@treeverse.io 10 Generated by OpenAPI Generator (https://openapi-generator.tech) 11 12 Do not edit the class manually. 13 """ # noqa: E501 14 15 16 import re # noqa: F401 17 import io 18 import warnings 19 20 try: 21 from pydantic.v1 import validate_arguments, ValidationError 22 except ImportError: 23 from pydantic import validate_arguments, ValidationError 24 from typing_extensions import Annotated 25 26 try: 27 from pydantic.v1 import Field, StrictBool, StrictStr, conint 28 except ImportError: 29 from pydantic import Field, StrictBool, StrictStr, conint 30 31 from typing import Optional 32 33 from lakefs_sdk.models.acl import ACL 34 from lakefs_sdk.models.authentication_token import AuthenticationToken 35 from lakefs_sdk.models.credentials import Credentials 36 from lakefs_sdk.models.credentials_list import CredentialsList 37 from lakefs_sdk.models.credentials_with_secret import CredentialsWithSecret 38 from lakefs_sdk.models.current_user import CurrentUser 39 from lakefs_sdk.models.external_login_information import ExternalLoginInformation 40 from lakefs_sdk.models.external_principal import ExternalPrincipal 41 from lakefs_sdk.models.external_principal_creation import ExternalPrincipalCreation 42 from lakefs_sdk.models.external_principal_list import ExternalPrincipalList 43 from lakefs_sdk.models.group import Group 44 from lakefs_sdk.models.group_creation import GroupCreation 45 from lakefs_sdk.models.group_list import GroupList 46 from lakefs_sdk.models.login_information import LoginInformation 47 from lakefs_sdk.models.policy import Policy 48 from lakefs_sdk.models.policy_list import PolicyList 49 from lakefs_sdk.models.user import User 50 from lakefs_sdk.models.user_creation import UserCreation 51 from lakefs_sdk.models.user_list import UserList 52 53 from lakefs_sdk.api_client import ApiClient 54 from lakefs_sdk.api_response import ApiResponse 55 from lakefs_sdk.exceptions import ( # noqa: F401 56 ApiTypeError, 57 ApiValueError 58 ) 59 60 61 class AuthApi(object): 62 """NOTE: This class is auto generated by OpenAPI Generator 63 Ref: https://openapi-generator.tech 64 65 Do not edit the class manually. 66 """ 67 68 def __init__(self, api_client=None): 69 if api_client is None: 70 api_client = ApiClient.get_default() 71 self.api_client = api_client 72 73 @validate_arguments 74 def add_group_membership(self, group_id : StrictStr, user_id : StrictStr, **kwargs) -> None: # noqa: E501 75 """add group membership # noqa: E501 76 77 This method makes a synchronous HTTP request by default. To make an 78 asynchronous HTTP request, please pass async_req=True 79 80 >>> thread = api.add_group_membership(group_id, user_id, async_req=True) 81 >>> result = thread.get() 82 83 :param group_id: (required) 84 :type group_id: str 85 :param user_id: (required) 86 :type user_id: str 87 :param async_req: Whether to execute the request asynchronously. 88 :type async_req: bool, optional 89 :param _request_timeout: timeout setting for this request. If one 90 number provided, it will be total request 91 timeout. It can also be a pair (tuple) of 92 (connection, read) timeouts. 93 :return: Returns the result object. 94 If the method is called asynchronously, 95 returns the request thread. 96 :rtype: None 97 """ 98 kwargs['_return_http_data_only'] = True 99 if '_preload_content' in kwargs: 100 raise ValueError("Error! Please call the add_group_membership_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") 101 return self.add_group_membership_with_http_info(group_id, user_id, **kwargs) # noqa: E501 102 103 @validate_arguments 104 def add_group_membership_with_http_info(self, group_id : StrictStr, user_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 105 """add group membership # noqa: E501 106 107 This method makes a synchronous HTTP request by default. To make an 108 asynchronous HTTP request, please pass async_req=True 109 110 >>> thread = api.add_group_membership_with_http_info(group_id, user_id, async_req=True) 111 >>> result = thread.get() 112 113 :param group_id: (required) 114 :type group_id: str 115 :param user_id: (required) 116 :type user_id: str 117 :param async_req: Whether to execute the request asynchronously. 118 :type async_req: bool, optional 119 :param _preload_content: if False, the ApiResponse.data will 120 be set to none and raw_data will store the 121 HTTP response body without reading/decoding. 122 Default is True. 123 :type _preload_content: bool, optional 124 :param _return_http_data_only: response data instead of ApiResponse 125 object with status code, headers, etc 126 :type _return_http_data_only: bool, optional 127 :param _request_timeout: timeout setting for this request. If one 128 number provided, it will be total request 129 timeout. It can also be a pair (tuple) of 130 (connection, read) timeouts. 131 :param _request_auth: set to override the auth_settings for an a single 132 request; this effectively ignores the authentication 133 in the spec for a single request. 134 :type _request_auth: dict, optional 135 :type _content_type: string, optional: force content-type for the request 136 :return: Returns the result object. 137 If the method is called asynchronously, 138 returns the request thread. 139 :rtype: None 140 """ 141 142 _params = locals() 143 144 _all_params = [ 145 'group_id', 146 'user_id' 147 ] 148 _all_params.extend( 149 [ 150 'async_req', 151 '_return_http_data_only', 152 '_preload_content', 153 '_request_timeout', 154 '_request_auth', 155 '_content_type', 156 '_headers' 157 ] 158 ) 159 160 # validate the arguments 161 for _key, _val in _params['kwargs'].items(): 162 if _key not in _all_params: 163 raise ApiTypeError( 164 "Got an unexpected keyword argument '%s'" 165 " to method add_group_membership" % _key 166 ) 167 _params[_key] = _val 168 del _params['kwargs'] 169 170 _collection_formats = {} 171 172 # process the path parameters 173 _path_params = {} 174 if _params['group_id']: 175 _path_params['groupId'] = _params['group_id'] 176 177 if _params['user_id']: 178 _path_params['userId'] = _params['user_id'] 179 180 181 # process the query parameters 182 _query_params = [] 183 # process the header parameters 184 _header_params = dict(_params.get('_headers', {})) 185 # process the form parameters 186 _form_params = [] 187 _files = {} 188 # process the body parameter 189 _body_params = None 190 # set the HTTP header `Accept` 191 _header_params['Accept'] = self.api_client.select_header_accept( 192 ['application/json']) # noqa: E501 193 194 # authentication setting 195 _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501 196 197 _response_types_map = {} 198 199 return self.api_client.call_api( 200 '/auth/groups/{groupId}/members/{userId}', 'PUT', 201 _path_params, 202 _query_params, 203 _header_params, 204 body=_body_params, 205 post_params=_form_params, 206 files=_files, 207 response_types_map=_response_types_map, 208 auth_settings=_auth_settings, 209 async_req=_params.get('async_req'), 210 _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 211 _preload_content=_params.get('_preload_content', True), 212 _request_timeout=_params.get('_request_timeout'), 213 collection_formats=_collection_formats, 214 _request_auth=_params.get('_request_auth')) 215 216 @validate_arguments 217 def attach_policy_to_group(self, group_id : StrictStr, policy_id : StrictStr, **kwargs) -> None: # noqa: E501 218 """attach policy to group # noqa: E501 219 220 This method makes a synchronous HTTP request by default. To make an 221 asynchronous HTTP request, please pass async_req=True 222 223 >>> thread = api.attach_policy_to_group(group_id, policy_id, async_req=True) 224 >>> result = thread.get() 225 226 :param group_id: (required) 227 :type group_id: str 228 :param policy_id: (required) 229 :type policy_id: str 230 :param async_req: Whether to execute the request asynchronously. 231 :type async_req: bool, optional 232 :param _request_timeout: timeout setting for this request. If one 233 number provided, it will be total request 234 timeout. It can also be a pair (tuple) of 235 (connection, read) timeouts. 236 :return: Returns the result object. 237 If the method is called asynchronously, 238 returns the request thread. 239 :rtype: None 240 """ 241 kwargs['_return_http_data_only'] = True 242 if '_preload_content' in kwargs: 243 raise ValueError("Error! Please call the attach_policy_to_group_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") 244 return self.attach_policy_to_group_with_http_info(group_id, policy_id, **kwargs) # noqa: E501 245 246 @validate_arguments 247 def attach_policy_to_group_with_http_info(self, group_id : StrictStr, policy_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 248 """attach policy to group # noqa: E501 249 250 This method makes a synchronous HTTP request by default. To make an 251 asynchronous HTTP request, please pass async_req=True 252 253 >>> thread = api.attach_policy_to_group_with_http_info(group_id, policy_id, async_req=True) 254 >>> result = thread.get() 255 256 :param group_id: (required) 257 :type group_id: str 258 :param policy_id: (required) 259 :type policy_id: str 260 :param async_req: Whether to execute the request asynchronously. 261 :type async_req: bool, optional 262 :param _preload_content: if False, the ApiResponse.data will 263 be set to none and raw_data will store the 264 HTTP response body without reading/decoding. 265 Default is True. 266 :type _preload_content: bool, optional 267 :param _return_http_data_only: response data instead of ApiResponse 268 object with status code, headers, etc 269 :type _return_http_data_only: bool, optional 270 :param _request_timeout: timeout setting for this request. If one 271 number provided, it will be total request 272 timeout. It can also be a pair (tuple) of 273 (connection, read) timeouts. 274 :param _request_auth: set to override the auth_settings for an a single 275 request; this effectively ignores the authentication 276 in the spec for a single request. 277 :type _request_auth: dict, optional 278 :type _content_type: string, optional: force content-type for the request 279 :return: Returns the result object. 280 If the method is called asynchronously, 281 returns the request thread. 282 :rtype: None 283 """ 284 285 _params = locals() 286 287 _all_params = [ 288 'group_id', 289 'policy_id' 290 ] 291 _all_params.extend( 292 [ 293 'async_req', 294 '_return_http_data_only', 295 '_preload_content', 296 '_request_timeout', 297 '_request_auth', 298 '_content_type', 299 '_headers' 300 ] 301 ) 302 303 # validate the arguments 304 for _key, _val in _params['kwargs'].items(): 305 if _key not in _all_params: 306 raise ApiTypeError( 307 "Got an unexpected keyword argument '%s'" 308 " to method attach_policy_to_group" % _key 309 ) 310 _params[_key] = _val 311 del _params['kwargs'] 312 313 _collection_formats = {} 314 315 # process the path parameters 316 _path_params = {} 317 if _params['group_id']: 318 _path_params['groupId'] = _params['group_id'] 319 320 if _params['policy_id']: 321 _path_params['policyId'] = _params['policy_id'] 322 323 324 # process the query parameters 325 _query_params = [] 326 # process the header parameters 327 _header_params = dict(_params.get('_headers', {})) 328 # process the form parameters 329 _form_params = [] 330 _files = {} 331 # process the body parameter 332 _body_params = None 333 # set the HTTP header `Accept` 334 _header_params['Accept'] = self.api_client.select_header_accept( 335 ['application/json']) # noqa: E501 336 337 # authentication setting 338 _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501 339 340 _response_types_map = {} 341 342 return self.api_client.call_api( 343 '/auth/groups/{groupId}/policies/{policyId}', 'PUT', 344 _path_params, 345 _query_params, 346 _header_params, 347 body=_body_params, 348 post_params=_form_params, 349 files=_files, 350 response_types_map=_response_types_map, 351 auth_settings=_auth_settings, 352 async_req=_params.get('async_req'), 353 _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 354 _preload_content=_params.get('_preload_content', True), 355 _request_timeout=_params.get('_request_timeout'), 356 collection_formats=_collection_formats, 357 _request_auth=_params.get('_request_auth')) 358 359 @validate_arguments 360 def attach_policy_to_user(self, user_id : StrictStr, policy_id : StrictStr, **kwargs) -> None: # noqa: E501 361 """attach policy to user # noqa: E501 362 363 This method makes a synchronous HTTP request by default. To make an 364 asynchronous HTTP request, please pass async_req=True 365 366 >>> thread = api.attach_policy_to_user(user_id, policy_id, async_req=True) 367 >>> result = thread.get() 368 369 :param user_id: (required) 370 :type user_id: str 371 :param policy_id: (required) 372 :type policy_id: str 373 :param async_req: Whether to execute the request asynchronously. 374 :type async_req: bool, optional 375 :param _request_timeout: timeout setting for this request. If one 376 number provided, it will be total request 377 timeout. It can also be a pair (tuple) of 378 (connection, read) timeouts. 379 :return: Returns the result object. 380 If the method is called asynchronously, 381 returns the request thread. 382 :rtype: None 383 """ 384 kwargs['_return_http_data_only'] = True 385 if '_preload_content' in kwargs: 386 raise ValueError("Error! Please call the attach_policy_to_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") 387 return self.attach_policy_to_user_with_http_info(user_id, policy_id, **kwargs) # noqa: E501 388 389 @validate_arguments 390 def attach_policy_to_user_with_http_info(self, user_id : StrictStr, policy_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 391 """attach policy to user # noqa: E501 392 393 This method makes a synchronous HTTP request by default. To make an 394 asynchronous HTTP request, please pass async_req=True 395 396 >>> thread = api.attach_policy_to_user_with_http_info(user_id, policy_id, async_req=True) 397 >>> result = thread.get() 398 399 :param user_id: (required) 400 :type user_id: str 401 :param policy_id: (required) 402 :type policy_id: str 403 :param async_req: Whether to execute the request asynchronously. 404 :type async_req: bool, optional 405 :param _preload_content: if False, the ApiResponse.data will 406 be set to none and raw_data will store the 407 HTTP response body without reading/decoding. 408 Default is True. 409 :type _preload_content: bool, optional 410 :param _return_http_data_only: response data instead of ApiResponse 411 object with status code, headers, etc 412 :type _return_http_data_only: bool, optional 413 :param _request_timeout: timeout setting for this request. If one 414 number provided, it will be total request 415 timeout. It can also be a pair (tuple) of 416 (connection, read) timeouts. 417 :param _request_auth: set to override the auth_settings for an a single 418 request; this effectively ignores the authentication 419 in the spec for a single request. 420 :type _request_auth: dict, optional 421 :type _content_type: string, optional: force content-type for the request 422 :return: Returns the result object. 423 If the method is called asynchronously, 424 returns the request thread. 425 :rtype: None 426 """ 427 428 _params = locals() 429 430 _all_params = [ 431 'user_id', 432 'policy_id' 433 ] 434 _all_params.extend( 435 [ 436 'async_req', 437 '_return_http_data_only', 438 '_preload_content', 439 '_request_timeout', 440 '_request_auth', 441 '_content_type', 442 '_headers' 443 ] 444 ) 445 446 # validate the arguments 447 for _key, _val in _params['kwargs'].items(): 448 if _key not in _all_params: 449 raise ApiTypeError( 450 "Got an unexpected keyword argument '%s'" 451 " to method attach_policy_to_user" % _key 452 ) 453 _params[_key] = _val 454 del _params['kwargs'] 455 456 _collection_formats = {} 457 458 # process the path parameters 459 _path_params = {} 460 if _params['user_id']: 461 _path_params['userId'] = _params['user_id'] 462 463 if _params['policy_id']: 464 _path_params['policyId'] = _params['policy_id'] 465 466 467 # process the query parameters 468 _query_params = [] 469 # process the header parameters 470 _header_params = dict(_params.get('_headers', {})) 471 # process the form parameters 472 _form_params = [] 473 _files = {} 474 # process the body parameter 475 _body_params = None 476 # set the HTTP header `Accept` 477 _header_params['Accept'] = self.api_client.select_header_accept( 478 ['application/json']) # noqa: E501 479 480 # authentication setting 481 _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501 482 483 _response_types_map = {} 484 485 return self.api_client.call_api( 486 '/auth/users/{userId}/policies/{policyId}', 'PUT', 487 _path_params, 488 _query_params, 489 _header_params, 490 body=_body_params, 491 post_params=_form_params, 492 files=_files, 493 response_types_map=_response_types_map, 494 auth_settings=_auth_settings, 495 async_req=_params.get('async_req'), 496 _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 497 _preload_content=_params.get('_preload_content', True), 498 _request_timeout=_params.get('_request_timeout'), 499 collection_formats=_collection_formats, 500 _request_auth=_params.get('_request_auth')) 501 502 @validate_arguments 503 def create_credentials(self, user_id : StrictStr, **kwargs) -> CredentialsWithSecret: # noqa: E501 504 """create credentials # noqa: E501 505 506 This method makes a synchronous HTTP request by default. To make an 507 asynchronous HTTP request, please pass async_req=True 508 509 >>> thread = api.create_credentials(user_id, async_req=True) 510 >>> result = thread.get() 511 512 :param user_id: (required) 513 :type user_id: str 514 :param async_req: Whether to execute the request asynchronously. 515 :type async_req: bool, optional 516 :param _request_timeout: timeout setting for this request. If one 517 number provided, it will be total request 518 timeout. It can also be a pair (tuple) of 519 (connection, read) timeouts. 520 :return: Returns the result object. 521 If the method is called asynchronously, 522 returns the request thread. 523 :rtype: CredentialsWithSecret 524 """ 525 kwargs['_return_http_data_only'] = True 526 if '_preload_content' in kwargs: 527 raise ValueError("Error! Please call the create_credentials_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") 528 return self.create_credentials_with_http_info(user_id, **kwargs) # noqa: E501 529 530 @validate_arguments 531 def create_credentials_with_http_info(self, user_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 532 """create credentials # noqa: E501 533 534 This method makes a synchronous HTTP request by default. To make an 535 asynchronous HTTP request, please pass async_req=True 536 537 >>> thread = api.create_credentials_with_http_info(user_id, async_req=True) 538 >>> result = thread.get() 539 540 :param user_id: (required) 541 :type user_id: str 542 :param async_req: Whether to execute the request asynchronously. 543 :type async_req: bool, optional 544 :param _preload_content: if False, the ApiResponse.data will 545 be set to none and raw_data will store the 546 HTTP response body without reading/decoding. 547 Default is True. 548 :type _preload_content: bool, optional 549 :param _return_http_data_only: response data instead of ApiResponse 550 object with status code, headers, etc 551 :type _return_http_data_only: bool, optional 552 :param _request_timeout: timeout setting for this request. If one 553 number provided, it will be total request 554 timeout. It can also be a pair (tuple) of 555 (connection, read) timeouts. 556 :param _request_auth: set to override the auth_settings for an a single 557 request; this effectively ignores the authentication 558 in the spec for a single request. 559 :type _request_auth: dict, optional 560 :type _content_type: string, optional: force content-type for the request 561 :return: Returns the result object. 562 If the method is called asynchronously, 563 returns the request thread. 564 :rtype: tuple(CredentialsWithSecret, status_code(int), headers(HTTPHeaderDict)) 565 """ 566 567 _params = locals() 568 569 _all_params = [ 570 'user_id' 571 ] 572 _all_params.extend( 573 [ 574 'async_req', 575 '_return_http_data_only', 576 '_preload_content', 577 '_request_timeout', 578 '_request_auth', 579 '_content_type', 580 '_headers' 581 ] 582 ) 583 584 # validate the arguments 585 for _key, _val in _params['kwargs'].items(): 586 if _key not in _all_params: 587 raise ApiTypeError( 588 "Got an unexpected keyword argument '%s'" 589 " to method create_credentials" % _key 590 ) 591 _params[_key] = _val 592 del _params['kwargs'] 593 594 _collection_formats = {} 595 596 # process the path parameters 597 _path_params = {} 598 if _params['user_id']: 599 _path_params['userId'] = _params['user_id'] 600 601 602 # process the query parameters 603 _query_params = [] 604 # process the header parameters 605 _header_params = dict(_params.get('_headers', {})) 606 # process the form parameters 607 _form_params = [] 608 _files = {} 609 # process the body parameter 610 _body_params = None 611 # set the HTTP header `Accept` 612 _header_params['Accept'] = self.api_client.select_header_accept( 613 ['application/json']) # noqa: E501 614 615 # authentication setting 616 _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501 617 618 _response_types_map = { 619 '201': "CredentialsWithSecret", 620 '401': "Error", 621 '404': "Error", 622 '420': None, 623 } 624 625 return self.api_client.call_api( 626 '/auth/users/{userId}/credentials', 'POST', 627 _path_params, 628 _query_params, 629 _header_params, 630 body=_body_params, 631 post_params=_form_params, 632 files=_files, 633 response_types_map=_response_types_map, 634 auth_settings=_auth_settings, 635 async_req=_params.get('async_req'), 636 _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 637 _preload_content=_params.get('_preload_content', True), 638 _request_timeout=_params.get('_request_timeout'), 639 collection_formats=_collection_formats, 640 _request_auth=_params.get('_request_auth')) 641 642 @validate_arguments 643 def create_group(self, group_creation : Optional[GroupCreation] = None, **kwargs) -> Group: # noqa: E501 644 """create group # noqa: E501 645 646 This method makes a synchronous HTTP request by default. To make an 647 asynchronous HTTP request, please pass async_req=True 648 649 >>> thread = api.create_group(group_creation, async_req=True) 650 >>> result = thread.get() 651 652 :param group_creation: 653 :type group_creation: GroupCreation 654 :param async_req: Whether to execute the request asynchronously. 655 :type async_req: bool, optional 656 :param _request_timeout: timeout setting for this request. If one 657 number provided, it will be total request 658 timeout. It can also be a pair (tuple) of 659 (connection, read) timeouts. 660 :return: Returns the result object. 661 If the method is called asynchronously, 662 returns the request thread. 663 :rtype: Group 664 """ 665 kwargs['_return_http_data_only'] = True 666 if '_preload_content' in kwargs: 667 raise ValueError("Error! Please call the create_group_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") 668 return self.create_group_with_http_info(group_creation, **kwargs) # noqa: E501 669 670 @validate_arguments 671 def create_group_with_http_info(self, group_creation : Optional[GroupCreation] = None, **kwargs) -> ApiResponse: # noqa: E501 672 """create group # noqa: E501 673 674 This method makes a synchronous HTTP request by default. To make an 675 asynchronous HTTP request, please pass async_req=True 676 677 >>> thread = api.create_group_with_http_info(group_creation, async_req=True) 678 >>> result = thread.get() 679 680 :param group_creation: 681 :type group_creation: GroupCreation 682 :param async_req: Whether to execute the request asynchronously. 683 :type async_req: bool, optional 684 :param _preload_content: if False, the ApiResponse.data will 685 be set to none and raw_data will store the 686 HTTP response body without reading/decoding. 687 Default is True. 688 :type _preload_content: bool, optional 689 :param _return_http_data_only: response data instead of ApiResponse 690 object with status code, headers, etc 691 :type _return_http_data_only: bool, optional 692 :param _request_timeout: timeout setting for this request. If one 693 number provided, it will be total request 694 timeout. It can also be a pair (tuple) of 695 (connection, read) timeouts. 696 :param _request_auth: set to override the auth_settings for an a single 697 request; this effectively ignores the authentication 698 in the spec for a single request. 699 :type _request_auth: dict, optional 700 :type _content_type: string, optional: force content-type for the request 701 :return: Returns the result object. 702 If the method is called asynchronously, 703 returns the request thread. 704 :rtype: tuple(Group, status_code(int), headers(HTTPHeaderDict)) 705 """ 706 707 _params = locals() 708 709 _all_params = [ 710 'group_creation' 711 ] 712 _all_params.extend( 713 [ 714 'async_req', 715 '_return_http_data_only', 716 '_preload_content', 717 '_request_timeout', 718 '_request_auth', 719 '_content_type', 720 '_headers' 721 ] 722 ) 723 724 # validate the arguments 725 for _key, _val in _params['kwargs'].items(): 726 if _key not in _all_params: 727 raise ApiTypeError( 728 "Got an unexpected keyword argument '%s'" 729 " to method create_group" % _key 730 ) 731 _params[_key] = _val 732 del _params['kwargs'] 733 734 _collection_formats = {} 735 736 # process the path parameters 737 _path_params = {} 738 739 # process the query parameters 740 _query_params = [] 741 # process the header parameters 742 _header_params = dict(_params.get('_headers', {})) 743 # process the form parameters 744 _form_params = [] 745 _files = {} 746 # process the body parameter 747 _body_params = None 748 if _params['group_creation'] is not None: 749 _body_params = _params['group_creation'] 750 751 # set the HTTP header `Accept` 752 _header_params['Accept'] = self.api_client.select_header_accept( 753 ['application/json']) # noqa: E501 754 755 # set the HTTP header `Content-Type` 756 _content_types_list = _params.get('_content_type', 757 self.api_client.select_header_content_type( 758 ['application/json'])) 759 if _content_types_list: 760 _header_params['Content-Type'] = _content_types_list 761 762 # authentication setting 763 _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501 764 765 _response_types_map = { 766 '201': "Group", 767 '401': "Error", 768 '404': "Error", 769 '420': None, 770 } 771 772 return self.api_client.call_api( 773 '/auth/groups', 'POST', 774 _path_params, 775 _query_params, 776 _header_params, 777 body=_body_params, 778 post_params=_form_params, 779 files=_files, 780 response_types_map=_response_types_map, 781 auth_settings=_auth_settings, 782 async_req=_params.get('async_req'), 783 _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 784 _preload_content=_params.get('_preload_content', True), 785 _request_timeout=_params.get('_request_timeout'), 786 collection_formats=_collection_formats, 787 _request_auth=_params.get('_request_auth')) 788 789 @validate_arguments 790 def create_policy(self, policy : Policy, **kwargs) -> Policy: # noqa: E501 791 """create policy # noqa: E501 792 793 This method makes a synchronous HTTP request by default. To make an 794 asynchronous HTTP request, please pass async_req=True 795 796 >>> thread = api.create_policy(policy, async_req=True) 797 >>> result = thread.get() 798 799 :param policy: (required) 800 :type policy: Policy 801 :param async_req: Whether to execute the request asynchronously. 802 :type async_req: bool, optional 803 :param _request_timeout: timeout setting for this request. If one 804 number provided, it will be total request 805 timeout. It can also be a pair (tuple) of 806 (connection, read) timeouts. 807 :return: Returns the result object. 808 If the method is called asynchronously, 809 returns the request thread. 810 :rtype: Policy 811 """ 812 kwargs['_return_http_data_only'] = True 813 if '_preload_content' in kwargs: 814 raise ValueError("Error! Please call the create_policy_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") 815 return self.create_policy_with_http_info(policy, **kwargs) # noqa: E501 816 817 @validate_arguments 818 def create_policy_with_http_info(self, policy : Policy, **kwargs) -> ApiResponse: # noqa: E501 819 """create policy # noqa: E501 820 821 This method makes a synchronous HTTP request by default. To make an 822 asynchronous HTTP request, please pass async_req=True 823 824 >>> thread = api.create_policy_with_http_info(policy, async_req=True) 825 >>> result = thread.get() 826 827 :param policy: (required) 828 :type policy: Policy 829 :param async_req: Whether to execute the request asynchronously. 830 :type async_req: bool, optional 831 :param _preload_content: if False, the ApiResponse.data will 832 be set to none and raw_data will store the 833 HTTP response body without reading/decoding. 834 Default is True. 835 :type _preload_content: bool, optional 836 :param _return_http_data_only: response data instead of ApiResponse 837 object with status code, headers, etc 838 :type _return_http_data_only: bool, optional 839 :param _request_timeout: timeout setting for this request. If one 840 number provided, it will be total request 841 timeout. It can also be a pair (tuple) of 842 (connection, read) timeouts. 843 :param _request_auth: set to override the auth_settings for an a single 844 request; this effectively ignores the authentication 845 in the spec for a single request. 846 :type _request_auth: dict, optional 847 :type _content_type: string, optional: force content-type for the request 848 :return: Returns the result object. 849 If the method is called asynchronously, 850 returns the request thread. 851 :rtype: tuple(Policy, status_code(int), headers(HTTPHeaderDict)) 852 """ 853 854 _params = locals() 855 856 _all_params = [ 857 'policy' 858 ] 859 _all_params.extend( 860 [ 861 'async_req', 862 '_return_http_data_only', 863 '_preload_content', 864 '_request_timeout', 865 '_request_auth', 866 '_content_type', 867 '_headers' 868 ] 869 ) 870 871 # validate the arguments 872 for _key, _val in _params['kwargs'].items(): 873 if _key not in _all_params: 874 raise ApiTypeError( 875 "Got an unexpected keyword argument '%s'" 876 " to method create_policy" % _key 877 ) 878 _params[_key] = _val 879 del _params['kwargs'] 880 881 _collection_formats = {} 882 883 # process the path parameters 884 _path_params = {} 885 886 # process the query parameters 887 _query_params = [] 888 # process the header parameters 889 _header_params = dict(_params.get('_headers', {})) 890 # process the form parameters 891 _form_params = [] 892 _files = {} 893 # process the body parameter 894 _body_params = None 895 if _params['policy'] is not None: 896 _body_params = _params['policy'] 897 898 # set the HTTP header `Accept` 899 _header_params['Accept'] = self.api_client.select_header_accept( 900 ['application/json']) # noqa: E501 901 902 # set the HTTP header `Content-Type` 903 _content_types_list = _params.get('_content_type', 904 self.api_client.select_header_content_type( 905 ['application/json'])) 906 if _content_types_list: 907 _header_params['Content-Type'] = _content_types_list 908 909 # authentication setting 910 _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501 911 912 _response_types_map = { 913 '201': "Policy", 914 '400': "Error", 915 '401': "Error", 916 '409': "Error", 917 '420': None, 918 } 919 920 return self.api_client.call_api( 921 '/auth/policies', 'POST', 922 _path_params, 923 _query_params, 924 _header_params, 925 body=_body_params, 926 post_params=_form_params, 927 files=_files, 928 response_types_map=_response_types_map, 929 auth_settings=_auth_settings, 930 async_req=_params.get('async_req'), 931 _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 932 _preload_content=_params.get('_preload_content', True), 933 _request_timeout=_params.get('_request_timeout'), 934 collection_formats=_collection_formats, 935 _request_auth=_params.get('_request_auth')) 936 937 @validate_arguments 938 def create_user(self, user_creation : Optional[UserCreation] = None, **kwargs) -> User: # noqa: E501 939 """create user # noqa: E501 940 941 This method makes a synchronous HTTP request by default. To make an 942 asynchronous HTTP request, please pass async_req=True 943 944 >>> thread = api.create_user(user_creation, async_req=True) 945 >>> result = thread.get() 946 947 :param user_creation: 948 :type user_creation: UserCreation 949 :param async_req: Whether to execute the request asynchronously. 950 :type async_req: bool, optional 951 :param _request_timeout: timeout setting for this request. If one 952 number provided, it will be total request 953 timeout. It can also be a pair (tuple) of 954 (connection, read) timeouts. 955 :return: Returns the result object. 956 If the method is called asynchronously, 957 returns the request thread. 958 :rtype: User 959 """ 960 kwargs['_return_http_data_only'] = True 961 if '_preload_content' in kwargs: 962 raise ValueError("Error! Please call the create_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") 963 return self.create_user_with_http_info(user_creation, **kwargs) # noqa: E501 964 965 @validate_arguments 966 def create_user_with_http_info(self, user_creation : Optional[UserCreation] = None, **kwargs) -> ApiResponse: # noqa: E501 967 """create user # noqa: E501 968 969 This method makes a synchronous HTTP request by default. To make an 970 asynchronous HTTP request, please pass async_req=True 971 972 >>> thread = api.create_user_with_http_info(user_creation, async_req=True) 973 >>> result = thread.get() 974 975 :param user_creation: 976 :type user_creation: UserCreation 977 :param async_req: Whether to execute the request asynchronously. 978 :type async_req: bool, optional 979 :param _preload_content: if False, the ApiResponse.data will 980 be set to none and raw_data will store the 981 HTTP response body without reading/decoding. 982 Default is True. 983 :type _preload_content: bool, optional 984 :param _return_http_data_only: response data instead of ApiResponse 985 object with status code, headers, etc 986 :type _return_http_data_only: bool, optional 987 :param _request_timeout: timeout setting for this request. If one 988 number provided, it will be total request 989 timeout. It can also be a pair (tuple) of 990 (connection, read) timeouts. 991 :param _request_auth: set to override the auth_settings for an a single 992 request; this effectively ignores the authentication 993 in the spec for a single request. 994 :type _request_auth: dict, optional 995 :type _content_type: string, optional: force content-type for the request 996 :return: Returns the result object. 997 If the method is called asynchronously, 998 returns the request thread. 999 :rtype: tuple(User, status_code(int), headers(HTTPHeaderDict)) 1000 """ 1001 1002 _params = locals() 1003 1004 _all_params = [ 1005 'user_creation' 1006 ] 1007 _all_params.extend( 1008 [ 1009 'async_req', 1010 '_return_http_data_only', 1011 '_preload_content', 1012 '_request_timeout', 1013 '_request_auth', 1014 '_content_type', 1015 '_headers' 1016 ] 1017 ) 1018 1019 # validate the arguments 1020 for _key, _val in _params['kwargs'].items(): 1021 if _key not in _all_params: 1022 raise ApiTypeError( 1023 "Got an unexpected keyword argument '%s'" 1024 " to method create_user" % _key 1025 ) 1026 _params[_key] = _val 1027 del _params['kwargs'] 1028 1029 _collection_formats = {} 1030 1031 # process the path parameters 1032 _path_params = {} 1033 1034 # process the query parameters 1035 _query_params = [] 1036 # process the header parameters 1037 _header_params = dict(_params.get('_headers', {})) 1038 # process the form parameters 1039 _form_params = [] 1040 _files = {} 1041 # process the body parameter 1042 _body_params = None 1043 if _params['user_creation'] is not None: 1044 _body_params = _params['user_creation'] 1045 1046 # set the HTTP header `Accept` 1047 _header_params['Accept'] = self.api_client.select_header_accept( 1048 ['application/json']) # noqa: E501 1049 1050 # set the HTTP header `Content-Type` 1051 _content_types_list = _params.get('_content_type', 1052 self.api_client.select_header_content_type( 1053 ['application/json'])) 1054 if _content_types_list: 1055 _header_params['Content-Type'] = _content_types_list 1056 1057 # authentication setting 1058 _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501 1059 1060 _response_types_map = { 1061 '201': "User", 1062 '400': "Error", 1063 '401': "Error", 1064 '409': "Error", 1065 '420': None, 1066 } 1067 1068 return self.api_client.call_api( 1069 '/auth/users', 'POST', 1070 _path_params, 1071 _query_params, 1072 _header_params, 1073 body=_body_params, 1074 post_params=_form_params, 1075 files=_files, 1076 response_types_map=_response_types_map, 1077 auth_settings=_auth_settings, 1078 async_req=_params.get('async_req'), 1079 _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 1080 _preload_content=_params.get('_preload_content', True), 1081 _request_timeout=_params.get('_request_timeout'), 1082 collection_formats=_collection_formats, 1083 _request_auth=_params.get('_request_auth')) 1084 1085 @validate_arguments 1086 def create_user_external_principal(self, user_id : StrictStr, principal_id : StrictStr, external_principal_creation : Optional[ExternalPrincipalCreation] = None, **kwargs) -> None: # noqa: E501 1087 """attach external principal to user # noqa: E501 1088 1089 This method makes a synchronous HTTP request by default. To make an 1090 asynchronous HTTP request, please pass async_req=True 1091 1092 >>> thread = api.create_user_external_principal(user_id, principal_id, external_principal_creation, async_req=True) 1093 >>> result = thread.get() 1094 1095 :param user_id: (required) 1096 :type user_id: str 1097 :param principal_id: (required) 1098 :type principal_id: str 1099 :param external_principal_creation: 1100 :type external_principal_creation: ExternalPrincipalCreation 1101 :param async_req: Whether to execute the request asynchronously. 1102 :type async_req: bool, optional 1103 :param _request_timeout: timeout setting for this request. If one 1104 number provided, it will be total request 1105 timeout. It can also be a pair (tuple) of 1106 (connection, read) timeouts. 1107 :return: Returns the result object. 1108 If the method is called asynchronously, 1109 returns the request thread. 1110 :rtype: None 1111 """ 1112 kwargs['_return_http_data_only'] = True 1113 if '_preload_content' in kwargs: 1114 raise ValueError("Error! Please call the create_user_external_principal_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") 1115 return self.create_user_external_principal_with_http_info(user_id, principal_id, external_principal_creation, **kwargs) # noqa: E501 1116 1117 @validate_arguments 1118 def create_user_external_principal_with_http_info(self, user_id : StrictStr, principal_id : StrictStr, external_principal_creation : Optional[ExternalPrincipalCreation] = None, **kwargs) -> ApiResponse: # noqa: E501 1119 """attach external principal to user # noqa: E501 1120 1121 This method makes a synchronous HTTP request by default. To make an 1122 asynchronous HTTP request, please pass async_req=True 1123 1124 >>> thread = api.create_user_external_principal_with_http_info(user_id, principal_id, external_principal_creation, async_req=True) 1125 >>> result = thread.get() 1126 1127 :param user_id: (required) 1128 :type user_id: str 1129 :param principal_id: (required) 1130 :type principal_id: str 1131 :param external_principal_creation: 1132 :type external_principal_creation: ExternalPrincipalCreation 1133 :param async_req: Whether to execute the request asynchronously. 1134 :type async_req: bool, optional 1135 :param _preload_content: if False, the ApiResponse.data will 1136 be set to none and raw_data will store the 1137 HTTP response body without reading/decoding. 1138 Default is True. 1139 :type _preload_content: bool, optional 1140 :param _return_http_data_only: response data instead of ApiResponse 1141 object with status code, headers, etc 1142 :type _return_http_data_only: bool, optional 1143 :param _request_timeout: timeout setting for this request. If one 1144 number provided, it will be total request 1145 timeout. It can also be a pair (tuple) of 1146 (connection, read) timeouts. 1147 :param _request_auth: set to override the auth_settings for an a single 1148 request; this effectively ignores the authentication 1149 in the spec for a single request. 1150 :type _request_auth: dict, optional 1151 :type _content_type: string, optional: force content-type for the request 1152 :return: Returns the result object. 1153 If the method is called asynchronously, 1154 returns the request thread. 1155 :rtype: None 1156 """ 1157 1158 _params = locals() 1159 1160 _all_params = [ 1161 'user_id', 1162 'principal_id', 1163 'external_principal_creation' 1164 ] 1165 _all_params.extend( 1166 [ 1167 'async_req', 1168 '_return_http_data_only', 1169 '_preload_content', 1170 '_request_timeout', 1171 '_request_auth', 1172 '_content_type', 1173 '_headers' 1174 ] 1175 ) 1176 1177 # validate the arguments 1178 for _key, _val in _params['kwargs'].items(): 1179 if _key not in _all_params: 1180 raise ApiTypeError( 1181 "Got an unexpected keyword argument '%s'" 1182 " to method create_user_external_principal" % _key 1183 ) 1184 _params[_key] = _val 1185 del _params['kwargs'] 1186 1187 _collection_formats = {} 1188 1189 # process the path parameters 1190 _path_params = {} 1191 if _params['user_id']: 1192 _path_params['userId'] = _params['user_id'] 1193 1194 1195 # process the query parameters 1196 _query_params = [] 1197 if _params.get('principal_id') is not None: # noqa: E501 1198 _query_params.append(('principalId', _params['principal_id'])) 1199 1200 # process the header parameters 1201 _header_params = dict(_params.get('_headers', {})) 1202 # process the form parameters 1203 _form_params = [] 1204 _files = {} 1205 # process the body parameter 1206 _body_params = None 1207 if _params['external_principal_creation'] is not None: 1208 _body_params = _params['external_principal_creation'] 1209 1210 # set the HTTP header `Accept` 1211 _header_params['Accept'] = self.api_client.select_header_accept( 1212 ['application/json']) # noqa: E501 1213 1214 # set the HTTP header `Content-Type` 1215 _content_types_list = _params.get('_content_type', 1216 self.api_client.select_header_content_type( 1217 ['application/json'])) 1218 if _content_types_list: 1219 _header_params['Content-Type'] = _content_types_list 1220 1221 # authentication setting 1222 _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501 1223 1224 _response_types_map = {} 1225 1226 return self.api_client.call_api( 1227 '/auth/users/{userId}/external/principals', 'POST', 1228 _path_params, 1229 _query_params, 1230 _header_params, 1231 body=_body_params, 1232 post_params=_form_params, 1233 files=_files, 1234 response_types_map=_response_types_map, 1235 auth_settings=_auth_settings, 1236 async_req=_params.get('async_req'), 1237 _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 1238 _preload_content=_params.get('_preload_content', True), 1239 _request_timeout=_params.get('_request_timeout'), 1240 collection_formats=_collection_formats, 1241 _request_auth=_params.get('_request_auth')) 1242 1243 @validate_arguments 1244 def delete_credentials(self, user_id : StrictStr, access_key_id : StrictStr, **kwargs) -> None: # noqa: E501 1245 """delete credentials # noqa: E501 1246 1247 This method makes a synchronous HTTP request by default. To make an 1248 asynchronous HTTP request, please pass async_req=True 1249 1250 >>> thread = api.delete_credentials(user_id, access_key_id, async_req=True) 1251 >>> result = thread.get() 1252 1253 :param user_id: (required) 1254 :type user_id: str 1255 :param access_key_id: (required) 1256 :type access_key_id: str 1257 :param async_req: Whether to execute the request asynchronously. 1258 :type async_req: bool, optional 1259 :param _request_timeout: timeout setting for this request. If one 1260 number provided, it will be total request 1261 timeout. It can also be a pair (tuple) of 1262 (connection, read) timeouts. 1263 :return: Returns the result object. 1264 If the method is called asynchronously, 1265 returns the request thread. 1266 :rtype: None 1267 """ 1268 kwargs['_return_http_data_only'] = True 1269 if '_preload_content' in kwargs: 1270 raise ValueError("Error! Please call the delete_credentials_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") 1271 return self.delete_credentials_with_http_info(user_id, access_key_id, **kwargs) # noqa: E501 1272 1273 @validate_arguments 1274 def delete_credentials_with_http_info(self, user_id : StrictStr, access_key_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 1275 """delete credentials # noqa: E501 1276 1277 This method makes a synchronous HTTP request by default. To make an 1278 asynchronous HTTP request, please pass async_req=True 1279 1280 >>> thread = api.delete_credentials_with_http_info(user_id, access_key_id, async_req=True) 1281 >>> result = thread.get() 1282 1283 :param user_id: (required) 1284 :type user_id: str 1285 :param access_key_id: (required) 1286 :type access_key_id: str 1287 :param async_req: Whether to execute the request asynchronously. 1288 :type async_req: bool, optional 1289 :param _preload_content: if False, the ApiResponse.data will 1290 be set to none and raw_data will store the 1291 HTTP response body without reading/decoding. 1292 Default is True. 1293 :type _preload_content: bool, optional 1294 :param _return_http_data_only: response data instead of ApiResponse 1295 object with status code, headers, etc 1296 :type _return_http_data_only: bool, optional 1297 :param _request_timeout: timeout setting for this request. If one 1298 number provided, it will be total request 1299 timeout. It can also be a pair (tuple) of 1300 (connection, read) timeouts. 1301 :param _request_auth: set to override the auth_settings for an a single 1302 request; this effectively ignores the authentication 1303 in the spec for a single request. 1304 :type _request_auth: dict, optional 1305 :type _content_type: string, optional: force content-type for the request 1306 :return: Returns the result object. 1307 If the method is called asynchronously, 1308 returns the request thread. 1309 :rtype: None 1310 """ 1311 1312 _params = locals() 1313 1314 _all_params = [ 1315 'user_id', 1316 'access_key_id' 1317 ] 1318 _all_params.extend( 1319 [ 1320 'async_req', 1321 '_return_http_data_only', 1322 '_preload_content', 1323 '_request_timeout', 1324 '_request_auth', 1325 '_content_type', 1326 '_headers' 1327 ] 1328 ) 1329 1330 # validate the arguments 1331 for _key, _val in _params['kwargs'].items(): 1332 if _key not in _all_params: 1333 raise ApiTypeError( 1334 "Got an unexpected keyword argument '%s'" 1335 " to method delete_credentials" % _key 1336 ) 1337 _params[_key] = _val 1338 del _params['kwargs'] 1339 1340 _collection_formats = {} 1341 1342 # process the path parameters 1343 _path_params = {} 1344 if _params['user_id']: 1345 _path_params['userId'] = _params['user_id'] 1346 1347 if _params['access_key_id']: 1348 _path_params['accessKeyId'] = _params['access_key_id'] 1349 1350 1351 # process the query parameters 1352 _query_params = [] 1353 # process the header parameters 1354 _header_params = dict(_params.get('_headers', {})) 1355 # process the form parameters 1356 _form_params = [] 1357 _files = {} 1358 # process the body parameter 1359 _body_params = None 1360 # set the HTTP header `Accept` 1361 _header_params['Accept'] = self.api_client.select_header_accept( 1362 ['application/json']) # noqa: E501 1363 1364 # authentication setting 1365 _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501 1366 1367 _response_types_map = {} 1368 1369 return self.api_client.call_api( 1370 '/auth/users/{userId}/credentials/{accessKeyId}', 'DELETE', 1371 _path_params, 1372 _query_params, 1373 _header_params, 1374 body=_body_params, 1375 post_params=_form_params, 1376 files=_files, 1377 response_types_map=_response_types_map, 1378 auth_settings=_auth_settings, 1379 async_req=_params.get('async_req'), 1380 _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 1381 _preload_content=_params.get('_preload_content', True), 1382 _request_timeout=_params.get('_request_timeout'), 1383 collection_formats=_collection_formats, 1384 _request_auth=_params.get('_request_auth')) 1385 1386 @validate_arguments 1387 def delete_group(self, group_id : StrictStr, **kwargs) -> None: # noqa: E501 1388 """delete group # noqa: E501 1389 1390 This method makes a synchronous HTTP request by default. To make an 1391 asynchronous HTTP request, please pass async_req=True 1392 1393 >>> thread = api.delete_group(group_id, async_req=True) 1394 >>> result = thread.get() 1395 1396 :param group_id: (required) 1397 :type group_id: str 1398 :param async_req: Whether to execute the request asynchronously. 1399 :type async_req: bool, optional 1400 :param _request_timeout: timeout setting for this request. If one 1401 number provided, it will be total request 1402 timeout. It can also be a pair (tuple) of 1403 (connection, read) timeouts. 1404 :return: Returns the result object. 1405 If the method is called asynchronously, 1406 returns the request thread. 1407 :rtype: None 1408 """ 1409 kwargs['_return_http_data_only'] = True 1410 if '_preload_content' in kwargs: 1411 raise ValueError("Error! Please call the delete_group_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") 1412 return self.delete_group_with_http_info(group_id, **kwargs) # noqa: E501 1413 1414 @validate_arguments 1415 def delete_group_with_http_info(self, group_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 1416 """delete group # noqa: E501 1417 1418 This method makes a synchronous HTTP request by default. To make an 1419 asynchronous HTTP request, please pass async_req=True 1420 1421 >>> thread = api.delete_group_with_http_info(group_id, async_req=True) 1422 >>> result = thread.get() 1423 1424 :param group_id: (required) 1425 :type group_id: str 1426 :param async_req: Whether to execute the request asynchronously. 1427 :type async_req: bool, optional 1428 :param _preload_content: if False, the ApiResponse.data will 1429 be set to none and raw_data will store the 1430 HTTP response body without reading/decoding. 1431 Default is True. 1432 :type _preload_content: bool, optional 1433 :param _return_http_data_only: response data instead of ApiResponse 1434 object with status code, headers, etc 1435 :type _return_http_data_only: bool, optional 1436 :param _request_timeout: timeout setting for this request. If one 1437 number provided, it will be total request 1438 timeout. It can also be a pair (tuple) of 1439 (connection, read) timeouts. 1440 :param _request_auth: set to override the auth_settings for an a single 1441 request; this effectively ignores the authentication 1442 in the spec for a single request. 1443 :type _request_auth: dict, optional 1444 :type _content_type: string, optional: force content-type for the request 1445 :return: Returns the result object. 1446 If the method is called asynchronously, 1447 returns the request thread. 1448 :rtype: None 1449 """ 1450 1451 _params = locals() 1452 1453 _all_params = [ 1454 'group_id' 1455 ] 1456 _all_params.extend( 1457 [ 1458 'async_req', 1459 '_return_http_data_only', 1460 '_preload_content', 1461 '_request_timeout', 1462 '_request_auth', 1463 '_content_type', 1464 '_headers' 1465 ] 1466 ) 1467 1468 # validate the arguments 1469 for _key, _val in _params['kwargs'].items(): 1470 if _key not in _all_params: 1471 raise ApiTypeError( 1472 "Got an unexpected keyword argument '%s'" 1473 " to method delete_group" % _key 1474 ) 1475 _params[_key] = _val 1476 del _params['kwargs'] 1477 1478 _collection_formats = {} 1479 1480 # process the path parameters 1481 _path_params = {} 1482 if _params['group_id']: 1483 _path_params['groupId'] = _params['group_id'] 1484 1485 1486 # process the query parameters 1487 _query_params = [] 1488 # process the header parameters 1489 _header_params = dict(_params.get('_headers', {})) 1490 # process the form parameters 1491 _form_params = [] 1492 _files = {} 1493 # process the body parameter 1494 _body_params = None 1495 # set the HTTP header `Accept` 1496 _header_params['Accept'] = self.api_client.select_header_accept( 1497 ['application/json']) # noqa: E501 1498 1499 # authentication setting 1500 _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501 1501 1502 _response_types_map = {} 1503 1504 return self.api_client.call_api( 1505 '/auth/groups/{groupId}', 'DELETE', 1506 _path_params, 1507 _query_params, 1508 _header_params, 1509 body=_body_params, 1510 post_params=_form_params, 1511 files=_files, 1512 response_types_map=_response_types_map, 1513 auth_settings=_auth_settings, 1514 async_req=_params.get('async_req'), 1515 _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 1516 _preload_content=_params.get('_preload_content', True), 1517 _request_timeout=_params.get('_request_timeout'), 1518 collection_formats=_collection_formats, 1519 _request_auth=_params.get('_request_auth')) 1520 1521 @validate_arguments 1522 def delete_group_membership(self, group_id : StrictStr, user_id : StrictStr, **kwargs) -> None: # noqa: E501 1523 """delete group membership # noqa: E501 1524 1525 This method makes a synchronous HTTP request by default. To make an 1526 asynchronous HTTP request, please pass async_req=True 1527 1528 >>> thread = api.delete_group_membership(group_id, user_id, async_req=True) 1529 >>> result = thread.get() 1530 1531 :param group_id: (required) 1532 :type group_id: str 1533 :param user_id: (required) 1534 :type user_id: str 1535 :param async_req: Whether to execute the request asynchronously. 1536 :type async_req: bool, optional 1537 :param _request_timeout: timeout setting for this request. If one 1538 number provided, it will be total request 1539 timeout. It can also be a pair (tuple) of 1540 (connection, read) timeouts. 1541 :return: Returns the result object. 1542 If the method is called asynchronously, 1543 returns the request thread. 1544 :rtype: None 1545 """ 1546 kwargs['_return_http_data_only'] = True 1547 if '_preload_content' in kwargs: 1548 raise ValueError("Error! Please call the delete_group_membership_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") 1549 return self.delete_group_membership_with_http_info(group_id, user_id, **kwargs) # noqa: E501 1550 1551 @validate_arguments 1552 def delete_group_membership_with_http_info(self, group_id : StrictStr, user_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 1553 """delete group membership # noqa: E501 1554 1555 This method makes a synchronous HTTP request by default. To make an 1556 asynchronous HTTP request, please pass async_req=True 1557 1558 >>> thread = api.delete_group_membership_with_http_info(group_id, user_id, async_req=True) 1559 >>> result = thread.get() 1560 1561 :param group_id: (required) 1562 :type group_id: str 1563 :param user_id: (required) 1564 :type user_id: str 1565 :param async_req: Whether to execute the request asynchronously. 1566 :type async_req: bool, optional 1567 :param _preload_content: if False, the ApiResponse.data will 1568 be set to none and raw_data will store the 1569 HTTP response body without reading/decoding. 1570 Default is True. 1571 :type _preload_content: bool, optional 1572 :param _return_http_data_only: response data instead of ApiResponse 1573 object with status code, headers, etc 1574 :type _return_http_data_only: bool, optional 1575 :param _request_timeout: timeout setting for this request. If one 1576 number provided, it will be total request 1577 timeout. It can also be a pair (tuple) of 1578 (connection, read) timeouts. 1579 :param _request_auth: set to override the auth_settings for an a single 1580 request; this effectively ignores the authentication 1581 in the spec for a single request. 1582 :type _request_auth: dict, optional 1583 :type _content_type: string, optional: force content-type for the request 1584 :return: Returns the result object. 1585 If the method is called asynchronously, 1586 returns the request thread. 1587 :rtype: None 1588 """ 1589 1590 _params = locals() 1591 1592 _all_params = [ 1593 'group_id', 1594 'user_id' 1595 ] 1596 _all_params.extend( 1597 [ 1598 'async_req', 1599 '_return_http_data_only', 1600 '_preload_content', 1601 '_request_timeout', 1602 '_request_auth', 1603 '_content_type', 1604 '_headers' 1605 ] 1606 ) 1607 1608 # validate the arguments 1609 for _key, _val in _params['kwargs'].items(): 1610 if _key not in _all_params: 1611 raise ApiTypeError( 1612 "Got an unexpected keyword argument '%s'" 1613 " to method delete_group_membership" % _key 1614 ) 1615 _params[_key] = _val 1616 del _params['kwargs'] 1617 1618 _collection_formats = {} 1619 1620 # process the path parameters 1621 _path_params = {} 1622 if _params['group_id']: 1623 _path_params['groupId'] = _params['group_id'] 1624 1625 if _params['user_id']: 1626 _path_params['userId'] = _params['user_id'] 1627 1628 1629 # process the query parameters 1630 _query_params = [] 1631 # process the header parameters 1632 _header_params = dict(_params.get('_headers', {})) 1633 # process the form parameters 1634 _form_params = [] 1635 _files = {} 1636 # process the body parameter 1637 _body_params = None 1638 # set the HTTP header `Accept` 1639 _header_params['Accept'] = self.api_client.select_header_accept( 1640 ['application/json']) # noqa: E501 1641 1642 # authentication setting 1643 _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501 1644 1645 _response_types_map = {} 1646 1647 return self.api_client.call_api( 1648 '/auth/groups/{groupId}/members/{userId}', 'DELETE', 1649 _path_params, 1650 _query_params, 1651 _header_params, 1652 body=_body_params, 1653 post_params=_form_params, 1654 files=_files, 1655 response_types_map=_response_types_map, 1656 auth_settings=_auth_settings, 1657 async_req=_params.get('async_req'), 1658 _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 1659 _preload_content=_params.get('_preload_content', True), 1660 _request_timeout=_params.get('_request_timeout'), 1661 collection_formats=_collection_formats, 1662 _request_auth=_params.get('_request_auth')) 1663 1664 @validate_arguments 1665 def delete_policy(self, policy_id : StrictStr, **kwargs) -> None: # noqa: E501 1666 """delete policy # noqa: E501 1667 1668 This method makes a synchronous HTTP request by default. To make an 1669 asynchronous HTTP request, please pass async_req=True 1670 1671 >>> thread = api.delete_policy(policy_id, async_req=True) 1672 >>> result = thread.get() 1673 1674 :param policy_id: (required) 1675 :type policy_id: str 1676 :param async_req: Whether to execute the request asynchronously. 1677 :type async_req: bool, optional 1678 :param _request_timeout: timeout setting for this request. If one 1679 number provided, it will be total request 1680 timeout. It can also be a pair (tuple) of 1681 (connection, read) timeouts. 1682 :return: Returns the result object. 1683 If the method is called asynchronously, 1684 returns the request thread. 1685 :rtype: None 1686 """ 1687 kwargs['_return_http_data_only'] = True 1688 if '_preload_content' in kwargs: 1689 raise ValueError("Error! Please call the delete_policy_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") 1690 return self.delete_policy_with_http_info(policy_id, **kwargs) # noqa: E501 1691 1692 @validate_arguments 1693 def delete_policy_with_http_info(self, policy_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 1694 """delete policy # noqa: E501 1695 1696 This method makes a synchronous HTTP request by default. To make an 1697 asynchronous HTTP request, please pass async_req=True 1698 1699 >>> thread = api.delete_policy_with_http_info(policy_id, async_req=True) 1700 >>> result = thread.get() 1701 1702 :param policy_id: (required) 1703 :type policy_id: str 1704 :param async_req: Whether to execute the request asynchronously. 1705 :type async_req: bool, optional 1706 :param _preload_content: if False, the ApiResponse.data will 1707 be set to none and raw_data will store the 1708 HTTP response body without reading/decoding. 1709 Default is True. 1710 :type _preload_content: bool, optional 1711 :param _return_http_data_only: response data instead of ApiResponse 1712 object with status code, headers, etc 1713 :type _return_http_data_only: bool, optional 1714 :param _request_timeout: timeout setting for this request. If one 1715 number provided, it will be total request 1716 timeout. It can also be a pair (tuple) of 1717 (connection, read) timeouts. 1718 :param _request_auth: set to override the auth_settings for an a single 1719 request; this effectively ignores the authentication 1720 in the spec for a single request. 1721 :type _request_auth: dict, optional 1722 :type _content_type: string, optional: force content-type for the request 1723 :return: Returns the result object. 1724 If the method is called asynchronously, 1725 returns the request thread. 1726 :rtype: None 1727 """ 1728 1729 _params = locals() 1730 1731 _all_params = [ 1732 'policy_id' 1733 ] 1734 _all_params.extend( 1735 [ 1736 'async_req', 1737 '_return_http_data_only', 1738 '_preload_content', 1739 '_request_timeout', 1740 '_request_auth', 1741 '_content_type', 1742 '_headers' 1743 ] 1744 ) 1745 1746 # validate the arguments 1747 for _key, _val in _params['kwargs'].items(): 1748 if _key not in _all_params: 1749 raise ApiTypeError( 1750 "Got an unexpected keyword argument '%s'" 1751 " to method delete_policy" % _key 1752 ) 1753 _params[_key] = _val 1754 del _params['kwargs'] 1755 1756 _collection_formats = {} 1757 1758 # process the path parameters 1759 _path_params = {} 1760 if _params['policy_id']: 1761 _path_params['policyId'] = _params['policy_id'] 1762 1763 1764 # process the query parameters 1765 _query_params = [] 1766 # process the header parameters 1767 _header_params = dict(_params.get('_headers', {})) 1768 # process the form parameters 1769 _form_params = [] 1770 _files = {} 1771 # process the body parameter 1772 _body_params = None 1773 # set the HTTP header `Accept` 1774 _header_params['Accept'] = self.api_client.select_header_accept( 1775 ['application/json']) # noqa: E501 1776 1777 # authentication setting 1778 _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501 1779 1780 _response_types_map = {} 1781 1782 return self.api_client.call_api( 1783 '/auth/policies/{policyId}', 'DELETE', 1784 _path_params, 1785 _query_params, 1786 _header_params, 1787 body=_body_params, 1788 post_params=_form_params, 1789 files=_files, 1790 response_types_map=_response_types_map, 1791 auth_settings=_auth_settings, 1792 async_req=_params.get('async_req'), 1793 _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 1794 _preload_content=_params.get('_preload_content', True), 1795 _request_timeout=_params.get('_request_timeout'), 1796 collection_formats=_collection_formats, 1797 _request_auth=_params.get('_request_auth')) 1798 1799 @validate_arguments 1800 def delete_user(self, user_id : StrictStr, **kwargs) -> None: # noqa: E501 1801 """delete user # noqa: E501 1802 1803 This method makes a synchronous HTTP request by default. To make an 1804 asynchronous HTTP request, please pass async_req=True 1805 1806 >>> thread = api.delete_user(user_id, async_req=True) 1807 >>> result = thread.get() 1808 1809 :param user_id: (required) 1810 :type user_id: str 1811 :param async_req: Whether to execute the request asynchronously. 1812 :type async_req: bool, optional 1813 :param _request_timeout: timeout setting for this request. If one 1814 number provided, it will be total request 1815 timeout. It can also be a pair (tuple) of 1816 (connection, read) timeouts. 1817 :return: Returns the result object. 1818 If the method is called asynchronously, 1819 returns the request thread. 1820 :rtype: None 1821 """ 1822 kwargs['_return_http_data_only'] = True 1823 if '_preload_content' in kwargs: 1824 raise ValueError("Error! Please call the delete_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") 1825 return self.delete_user_with_http_info(user_id, **kwargs) # noqa: E501 1826 1827 @validate_arguments 1828 def delete_user_with_http_info(self, user_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 1829 """delete user # noqa: E501 1830 1831 This method makes a synchronous HTTP request by default. To make an 1832 asynchronous HTTP request, please pass async_req=True 1833 1834 >>> thread = api.delete_user_with_http_info(user_id, async_req=True) 1835 >>> result = thread.get() 1836 1837 :param user_id: (required) 1838 :type user_id: str 1839 :param async_req: Whether to execute the request asynchronously. 1840 :type async_req: bool, optional 1841 :param _preload_content: if False, the ApiResponse.data will 1842 be set to none and raw_data will store the 1843 HTTP response body without reading/decoding. 1844 Default is True. 1845 :type _preload_content: bool, optional 1846 :param _return_http_data_only: response data instead of ApiResponse 1847 object with status code, headers, etc 1848 :type _return_http_data_only: bool, optional 1849 :param _request_timeout: timeout setting for this request. If one 1850 number provided, it will be total request 1851 timeout. It can also be a pair (tuple) of 1852 (connection, read) timeouts. 1853 :param _request_auth: set to override the auth_settings for an a single 1854 request; this effectively ignores the authentication 1855 in the spec for a single request. 1856 :type _request_auth: dict, optional 1857 :type _content_type: string, optional: force content-type for the request 1858 :return: Returns the result object. 1859 If the method is called asynchronously, 1860 returns the request thread. 1861 :rtype: None 1862 """ 1863 1864 _params = locals() 1865 1866 _all_params = [ 1867 'user_id' 1868 ] 1869 _all_params.extend( 1870 [ 1871 'async_req', 1872 '_return_http_data_only', 1873 '_preload_content', 1874 '_request_timeout', 1875 '_request_auth', 1876 '_content_type', 1877 '_headers' 1878 ] 1879 ) 1880 1881 # validate the arguments 1882 for _key, _val in _params['kwargs'].items(): 1883 if _key not in _all_params: 1884 raise ApiTypeError( 1885 "Got an unexpected keyword argument '%s'" 1886 " to method delete_user" % _key 1887 ) 1888 _params[_key] = _val 1889 del _params['kwargs'] 1890 1891 _collection_formats = {} 1892 1893 # process the path parameters 1894 _path_params = {} 1895 if _params['user_id']: 1896 _path_params['userId'] = _params['user_id'] 1897 1898 1899 # process the query parameters 1900 _query_params = [] 1901 # process the header parameters 1902 _header_params = dict(_params.get('_headers', {})) 1903 # process the form parameters 1904 _form_params = [] 1905 _files = {} 1906 # process the body parameter 1907 _body_params = None 1908 # set the HTTP header `Accept` 1909 _header_params['Accept'] = self.api_client.select_header_accept( 1910 ['application/json']) # noqa: E501 1911 1912 # authentication setting 1913 _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501 1914 1915 _response_types_map = {} 1916 1917 return self.api_client.call_api( 1918 '/auth/users/{userId}', 'DELETE', 1919 _path_params, 1920 _query_params, 1921 _header_params, 1922 body=_body_params, 1923 post_params=_form_params, 1924 files=_files, 1925 response_types_map=_response_types_map, 1926 auth_settings=_auth_settings, 1927 async_req=_params.get('async_req'), 1928 _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 1929 _preload_content=_params.get('_preload_content', True), 1930 _request_timeout=_params.get('_request_timeout'), 1931 collection_formats=_collection_formats, 1932 _request_auth=_params.get('_request_auth')) 1933 1934 @validate_arguments 1935 def delete_user_external_principal(self, user_id : StrictStr, principal_id : StrictStr, **kwargs) -> None: # noqa: E501 1936 """delete external principal from user # noqa: E501 1937 1938 This method makes a synchronous HTTP request by default. To make an 1939 asynchronous HTTP request, please pass async_req=True 1940 1941 >>> thread = api.delete_user_external_principal(user_id, principal_id, async_req=True) 1942 >>> result = thread.get() 1943 1944 :param user_id: (required) 1945 :type user_id: str 1946 :param principal_id: (required) 1947 :type principal_id: str 1948 :param async_req: Whether to execute the request asynchronously. 1949 :type async_req: bool, optional 1950 :param _request_timeout: timeout setting for this request. If one 1951 number provided, it will be total request 1952 timeout. It can also be a pair (tuple) of 1953 (connection, read) timeouts. 1954 :return: Returns the result object. 1955 If the method is called asynchronously, 1956 returns the request thread. 1957 :rtype: None 1958 """ 1959 kwargs['_return_http_data_only'] = True 1960 if '_preload_content' in kwargs: 1961 raise ValueError("Error! Please call the delete_user_external_principal_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") 1962 return self.delete_user_external_principal_with_http_info(user_id, principal_id, **kwargs) # noqa: E501 1963 1964 @validate_arguments 1965 def delete_user_external_principal_with_http_info(self, user_id : StrictStr, principal_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 1966 """delete external principal from user # noqa: E501 1967 1968 This method makes a synchronous HTTP request by default. To make an 1969 asynchronous HTTP request, please pass async_req=True 1970 1971 >>> thread = api.delete_user_external_principal_with_http_info(user_id, principal_id, async_req=True) 1972 >>> result = thread.get() 1973 1974 :param user_id: (required) 1975 :type user_id: str 1976 :param principal_id: (required) 1977 :type principal_id: str 1978 :param async_req: Whether to execute the request asynchronously. 1979 :type async_req: bool, optional 1980 :param _preload_content: if False, the ApiResponse.data will 1981 be set to none and raw_data will store the 1982 HTTP response body without reading/decoding. 1983 Default is True. 1984 :type _preload_content: bool, optional 1985 :param _return_http_data_only: response data instead of ApiResponse 1986 object with status code, headers, etc 1987 :type _return_http_data_only: bool, optional 1988 :param _request_timeout: timeout setting for this request. If one 1989 number provided, it will be total request 1990 timeout. It can also be a pair (tuple) of 1991 (connection, read) timeouts. 1992 :param _request_auth: set to override the auth_settings for an a single 1993 request; this effectively ignores the authentication 1994 in the spec for a single request. 1995 :type _request_auth: dict, optional 1996 :type _content_type: string, optional: force content-type for the request 1997 :return: Returns the result object. 1998 If the method is called asynchronously, 1999 returns the request thread. 2000 :rtype: None 2001 """ 2002 2003 _params = locals() 2004 2005 _all_params = [ 2006 'user_id', 2007 'principal_id' 2008 ] 2009 _all_params.extend( 2010 [ 2011 'async_req', 2012 '_return_http_data_only', 2013 '_preload_content', 2014 '_request_timeout', 2015 '_request_auth', 2016 '_content_type', 2017 '_headers' 2018 ] 2019 ) 2020 2021 # validate the arguments 2022 for _key, _val in _params['kwargs'].items(): 2023 if _key not in _all_params: 2024 raise ApiTypeError( 2025 "Got an unexpected keyword argument '%s'" 2026 " to method delete_user_external_principal" % _key 2027 ) 2028 _params[_key] = _val 2029 del _params['kwargs'] 2030 2031 _collection_formats = {} 2032 2033 # process the path parameters 2034 _path_params = {} 2035 if _params['user_id']: 2036 _path_params['userId'] = _params['user_id'] 2037 2038 2039 # process the query parameters 2040 _query_params = [] 2041 if _params.get('principal_id') is not None: # noqa: E501 2042 _query_params.append(('principalId', _params['principal_id'])) 2043 2044 # process the header parameters 2045 _header_params = dict(_params.get('_headers', {})) 2046 # process the form parameters 2047 _form_params = [] 2048 _files = {} 2049 # process the body parameter 2050 _body_params = None 2051 # set the HTTP header `Accept` 2052 _header_params['Accept'] = self.api_client.select_header_accept( 2053 ['application/json']) # noqa: E501 2054 2055 # authentication setting 2056 _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501 2057 2058 _response_types_map = {} 2059 2060 return self.api_client.call_api( 2061 '/auth/users/{userId}/external/principals', 'DELETE', 2062 _path_params, 2063 _query_params, 2064 _header_params, 2065 body=_body_params, 2066 post_params=_form_params, 2067 files=_files, 2068 response_types_map=_response_types_map, 2069 auth_settings=_auth_settings, 2070 async_req=_params.get('async_req'), 2071 _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 2072 _preload_content=_params.get('_preload_content', True), 2073 _request_timeout=_params.get('_request_timeout'), 2074 collection_formats=_collection_formats, 2075 _request_auth=_params.get('_request_auth')) 2076 2077 @validate_arguments 2078 def detach_policy_from_group(self, group_id : StrictStr, policy_id : StrictStr, **kwargs) -> None: # noqa: E501 2079 """detach policy from group # noqa: E501 2080 2081 This method makes a synchronous HTTP request by default. To make an 2082 asynchronous HTTP request, please pass async_req=True 2083 2084 >>> thread = api.detach_policy_from_group(group_id, policy_id, async_req=True) 2085 >>> result = thread.get() 2086 2087 :param group_id: (required) 2088 :type group_id: str 2089 :param policy_id: (required) 2090 :type policy_id: str 2091 :param async_req: Whether to execute the request asynchronously. 2092 :type async_req: bool, optional 2093 :param _request_timeout: timeout setting for this request. If one 2094 number provided, it will be total request 2095 timeout. It can also be a pair (tuple) of 2096 (connection, read) timeouts. 2097 :return: Returns the result object. 2098 If the method is called asynchronously, 2099 returns the request thread. 2100 :rtype: None 2101 """ 2102 kwargs['_return_http_data_only'] = True 2103 if '_preload_content' in kwargs: 2104 raise ValueError("Error! Please call the detach_policy_from_group_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") 2105 return self.detach_policy_from_group_with_http_info(group_id, policy_id, **kwargs) # noqa: E501 2106 2107 @validate_arguments 2108 def detach_policy_from_group_with_http_info(self, group_id : StrictStr, policy_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 2109 """detach policy from group # noqa: E501 2110 2111 This method makes a synchronous HTTP request by default. To make an 2112 asynchronous HTTP request, please pass async_req=True 2113 2114 >>> thread = api.detach_policy_from_group_with_http_info(group_id, policy_id, async_req=True) 2115 >>> result = thread.get() 2116 2117 :param group_id: (required) 2118 :type group_id: str 2119 :param policy_id: (required) 2120 :type policy_id: str 2121 :param async_req: Whether to execute the request asynchronously. 2122 :type async_req: bool, optional 2123 :param _preload_content: if False, the ApiResponse.data will 2124 be set to none and raw_data will store the 2125 HTTP response body without reading/decoding. 2126 Default is True. 2127 :type _preload_content: bool, optional 2128 :param _return_http_data_only: response data instead of ApiResponse 2129 object with status code, headers, etc 2130 :type _return_http_data_only: bool, optional 2131 :param _request_timeout: timeout setting for this request. If one 2132 number provided, it will be total request 2133 timeout. It can also be a pair (tuple) of 2134 (connection, read) timeouts. 2135 :param _request_auth: set to override the auth_settings for an a single 2136 request; this effectively ignores the authentication 2137 in the spec for a single request. 2138 :type _request_auth: dict, optional 2139 :type _content_type: string, optional: force content-type for the request 2140 :return: Returns the result object. 2141 If the method is called asynchronously, 2142 returns the request thread. 2143 :rtype: None 2144 """ 2145 2146 _params = locals() 2147 2148 _all_params = [ 2149 'group_id', 2150 'policy_id' 2151 ] 2152 _all_params.extend( 2153 [ 2154 'async_req', 2155 '_return_http_data_only', 2156 '_preload_content', 2157 '_request_timeout', 2158 '_request_auth', 2159 '_content_type', 2160 '_headers' 2161 ] 2162 ) 2163 2164 # validate the arguments 2165 for _key, _val in _params['kwargs'].items(): 2166 if _key not in _all_params: 2167 raise ApiTypeError( 2168 "Got an unexpected keyword argument '%s'" 2169 " to method detach_policy_from_group" % _key 2170 ) 2171 _params[_key] = _val 2172 del _params['kwargs'] 2173 2174 _collection_formats = {} 2175 2176 # process the path parameters 2177 _path_params = {} 2178 if _params['group_id']: 2179 _path_params['groupId'] = _params['group_id'] 2180 2181 if _params['policy_id']: 2182 _path_params['policyId'] = _params['policy_id'] 2183 2184 2185 # process the query parameters 2186 _query_params = [] 2187 # process the header parameters 2188 _header_params = dict(_params.get('_headers', {})) 2189 # process the form parameters 2190 _form_params = [] 2191 _files = {} 2192 # process the body parameter 2193 _body_params = None 2194 # set the HTTP header `Accept` 2195 _header_params['Accept'] = self.api_client.select_header_accept( 2196 ['application/json']) # noqa: E501 2197 2198 # authentication setting 2199 _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501 2200 2201 _response_types_map = {} 2202 2203 return self.api_client.call_api( 2204 '/auth/groups/{groupId}/policies/{policyId}', 'DELETE', 2205 _path_params, 2206 _query_params, 2207 _header_params, 2208 body=_body_params, 2209 post_params=_form_params, 2210 files=_files, 2211 response_types_map=_response_types_map, 2212 auth_settings=_auth_settings, 2213 async_req=_params.get('async_req'), 2214 _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 2215 _preload_content=_params.get('_preload_content', True), 2216 _request_timeout=_params.get('_request_timeout'), 2217 collection_formats=_collection_formats, 2218 _request_auth=_params.get('_request_auth')) 2219 2220 @validate_arguments 2221 def detach_policy_from_user(self, user_id : StrictStr, policy_id : StrictStr, **kwargs) -> None: # noqa: E501 2222 """detach policy from user # noqa: E501 2223 2224 This method makes a synchronous HTTP request by default. To make an 2225 asynchronous HTTP request, please pass async_req=True 2226 2227 >>> thread = api.detach_policy_from_user(user_id, policy_id, async_req=True) 2228 >>> result = thread.get() 2229 2230 :param user_id: (required) 2231 :type user_id: str 2232 :param policy_id: (required) 2233 :type policy_id: str 2234 :param async_req: Whether to execute the request asynchronously. 2235 :type async_req: bool, optional 2236 :param _request_timeout: timeout setting for this request. If one 2237 number provided, it will be total request 2238 timeout. It can also be a pair (tuple) of 2239 (connection, read) timeouts. 2240 :return: Returns the result object. 2241 If the method is called asynchronously, 2242 returns the request thread. 2243 :rtype: None 2244 """ 2245 kwargs['_return_http_data_only'] = True 2246 if '_preload_content' in kwargs: 2247 raise ValueError("Error! Please call the detach_policy_from_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") 2248 return self.detach_policy_from_user_with_http_info(user_id, policy_id, **kwargs) # noqa: E501 2249 2250 @validate_arguments 2251 def detach_policy_from_user_with_http_info(self, user_id : StrictStr, policy_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 2252 """detach policy from user # noqa: E501 2253 2254 This method makes a synchronous HTTP request by default. To make an 2255 asynchronous HTTP request, please pass async_req=True 2256 2257 >>> thread = api.detach_policy_from_user_with_http_info(user_id, policy_id, async_req=True) 2258 >>> result = thread.get() 2259 2260 :param user_id: (required) 2261 :type user_id: str 2262 :param policy_id: (required) 2263 :type policy_id: str 2264 :param async_req: Whether to execute the request asynchronously. 2265 :type async_req: bool, optional 2266 :param _preload_content: if False, the ApiResponse.data will 2267 be set to none and raw_data will store the 2268 HTTP response body without reading/decoding. 2269 Default is True. 2270 :type _preload_content: bool, optional 2271 :param _return_http_data_only: response data instead of ApiResponse 2272 object with status code, headers, etc 2273 :type _return_http_data_only: bool, optional 2274 :param _request_timeout: timeout setting for this request. If one 2275 number provided, it will be total request 2276 timeout. It can also be a pair (tuple) of 2277 (connection, read) timeouts. 2278 :param _request_auth: set to override the auth_settings for an a single 2279 request; this effectively ignores the authentication 2280 in the spec for a single request. 2281 :type _request_auth: dict, optional 2282 :type _content_type: string, optional: force content-type for the request 2283 :return: Returns the result object. 2284 If the method is called asynchronously, 2285 returns the request thread. 2286 :rtype: None 2287 """ 2288 2289 _params = locals() 2290 2291 _all_params = [ 2292 'user_id', 2293 'policy_id' 2294 ] 2295 _all_params.extend( 2296 [ 2297 'async_req', 2298 '_return_http_data_only', 2299 '_preload_content', 2300 '_request_timeout', 2301 '_request_auth', 2302 '_content_type', 2303 '_headers' 2304 ] 2305 ) 2306 2307 # validate the arguments 2308 for _key, _val in _params['kwargs'].items(): 2309 if _key not in _all_params: 2310 raise ApiTypeError( 2311 "Got an unexpected keyword argument '%s'" 2312 " to method detach_policy_from_user" % _key 2313 ) 2314 _params[_key] = _val 2315 del _params['kwargs'] 2316 2317 _collection_formats = {} 2318 2319 # process the path parameters 2320 _path_params = {} 2321 if _params['user_id']: 2322 _path_params['userId'] = _params['user_id'] 2323 2324 if _params['policy_id']: 2325 _path_params['policyId'] = _params['policy_id'] 2326 2327 2328 # process the query parameters 2329 _query_params = [] 2330 # process the header parameters 2331 _header_params = dict(_params.get('_headers', {})) 2332 # process the form parameters 2333 _form_params = [] 2334 _files = {} 2335 # process the body parameter 2336 _body_params = None 2337 # set the HTTP header `Accept` 2338 _header_params['Accept'] = self.api_client.select_header_accept( 2339 ['application/json']) # noqa: E501 2340 2341 # authentication setting 2342 _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501 2343 2344 _response_types_map = {} 2345 2346 return self.api_client.call_api( 2347 '/auth/users/{userId}/policies/{policyId}', 'DELETE', 2348 _path_params, 2349 _query_params, 2350 _header_params, 2351 body=_body_params, 2352 post_params=_form_params, 2353 files=_files, 2354 response_types_map=_response_types_map, 2355 auth_settings=_auth_settings, 2356 async_req=_params.get('async_req'), 2357 _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 2358 _preload_content=_params.get('_preload_content', True), 2359 _request_timeout=_params.get('_request_timeout'), 2360 collection_formats=_collection_formats, 2361 _request_auth=_params.get('_request_auth')) 2362 2363 @validate_arguments 2364 def external_principal_login(self, external_login_information : Optional[ExternalLoginInformation] = None, **kwargs) -> AuthenticationToken: # noqa: E501 2365 """perform a login using an external authenticator # noqa: E501 2366 2367 This method makes a synchronous HTTP request by default. To make an 2368 asynchronous HTTP request, please pass async_req=True 2369 2370 >>> thread = api.external_principal_login(external_login_information, async_req=True) 2371 >>> result = thread.get() 2372 2373 :param external_login_information: 2374 :type external_login_information: ExternalLoginInformation 2375 :param async_req: Whether to execute the request asynchronously. 2376 :type async_req: bool, optional 2377 :param _request_timeout: timeout setting for this request. If one 2378 number provided, it will be total request 2379 timeout. It can also be a pair (tuple) of 2380 (connection, read) timeouts. 2381 :return: Returns the result object. 2382 If the method is called asynchronously, 2383 returns the request thread. 2384 :rtype: AuthenticationToken 2385 """ 2386 kwargs['_return_http_data_only'] = True 2387 if '_preload_content' in kwargs: 2388 raise ValueError("Error! Please call the external_principal_login_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") 2389 return self.external_principal_login_with_http_info(external_login_information, **kwargs) # noqa: E501 2390 2391 @validate_arguments 2392 def external_principal_login_with_http_info(self, external_login_information : Optional[ExternalLoginInformation] = None, **kwargs) -> ApiResponse: # noqa: E501 2393 """perform a login using an external authenticator # noqa: E501 2394 2395 This method makes a synchronous HTTP request by default. To make an 2396 asynchronous HTTP request, please pass async_req=True 2397 2398 >>> thread = api.external_principal_login_with_http_info(external_login_information, async_req=True) 2399 >>> result = thread.get() 2400 2401 :param external_login_information: 2402 :type external_login_information: ExternalLoginInformation 2403 :param async_req: Whether to execute the request asynchronously. 2404 :type async_req: bool, optional 2405 :param _preload_content: if False, the ApiResponse.data will 2406 be set to none and raw_data will store the 2407 HTTP response body without reading/decoding. 2408 Default is True. 2409 :type _preload_content: bool, optional 2410 :param _return_http_data_only: response data instead of ApiResponse 2411 object with status code, headers, etc 2412 :type _return_http_data_only: bool, optional 2413 :param _request_timeout: timeout setting for this request. If one 2414 number provided, it will be total request 2415 timeout. It can also be a pair (tuple) of 2416 (connection, read) timeouts. 2417 :param _request_auth: set to override the auth_settings for an a single 2418 request; this effectively ignores the authentication 2419 in the spec for a single request. 2420 :type _request_auth: dict, optional 2421 :type _content_type: string, optional: force content-type for the request 2422 :return: Returns the result object. 2423 If the method is called asynchronously, 2424 returns the request thread. 2425 :rtype: tuple(AuthenticationToken, status_code(int), headers(HTTPHeaderDict)) 2426 """ 2427 2428 _params = locals() 2429 2430 _all_params = [ 2431 'external_login_information' 2432 ] 2433 _all_params.extend( 2434 [ 2435 'async_req', 2436 '_return_http_data_only', 2437 '_preload_content', 2438 '_request_timeout', 2439 '_request_auth', 2440 '_content_type', 2441 '_headers' 2442 ] 2443 ) 2444 2445 # validate the arguments 2446 for _key, _val in _params['kwargs'].items(): 2447 if _key not in _all_params: 2448 raise ApiTypeError( 2449 "Got an unexpected keyword argument '%s'" 2450 " to method external_principal_login" % _key 2451 ) 2452 _params[_key] = _val 2453 del _params['kwargs'] 2454 2455 _collection_formats = {} 2456 2457 # process the path parameters 2458 _path_params = {} 2459 2460 # process the query parameters 2461 _query_params = [] 2462 # process the header parameters 2463 _header_params = dict(_params.get('_headers', {})) 2464 # process the form parameters 2465 _form_params = [] 2466 _files = {} 2467 # process the body parameter 2468 _body_params = None 2469 if _params['external_login_information'] is not None: 2470 _body_params = _params['external_login_information'] 2471 2472 # set the HTTP header `Accept` 2473 _header_params['Accept'] = self.api_client.select_header_accept( 2474 ['application/json']) # noqa: E501 2475 2476 # set the HTTP header `Content-Type` 2477 _content_types_list = _params.get('_content_type', 2478 self.api_client.select_header_content_type( 2479 ['application/json'])) 2480 if _content_types_list: 2481 _header_params['Content-Type'] = _content_types_list 2482 2483 # authentication setting 2484 _auth_settings = [] # noqa: E501 2485 2486 _response_types_map = { 2487 '200': "AuthenticationToken", 2488 '400': "Error", 2489 '401': "Error", 2490 '403': "Error", 2491 '404': "Error", 2492 '420': None, 2493 } 2494 2495 return self.api_client.call_api( 2496 '/auth/external/principal/login', 'POST', 2497 _path_params, 2498 _query_params, 2499 _header_params, 2500 body=_body_params, 2501 post_params=_form_params, 2502 files=_files, 2503 response_types_map=_response_types_map, 2504 auth_settings=_auth_settings, 2505 async_req=_params.get('async_req'), 2506 _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 2507 _preload_content=_params.get('_preload_content', True), 2508 _request_timeout=_params.get('_request_timeout'), 2509 collection_formats=_collection_formats, 2510 _request_auth=_params.get('_request_auth')) 2511 2512 @validate_arguments 2513 def get_credentials(self, user_id : StrictStr, access_key_id : StrictStr, **kwargs) -> Credentials: # noqa: E501 2514 """get credentials # noqa: E501 2515 2516 This method makes a synchronous HTTP request by default. To make an 2517 asynchronous HTTP request, please pass async_req=True 2518 2519 >>> thread = api.get_credentials(user_id, access_key_id, async_req=True) 2520 >>> result = thread.get() 2521 2522 :param user_id: (required) 2523 :type user_id: str 2524 :param access_key_id: (required) 2525 :type access_key_id: str 2526 :param async_req: Whether to execute the request asynchronously. 2527 :type async_req: bool, optional 2528 :param _request_timeout: timeout setting for this request. If one 2529 number provided, it will be total request 2530 timeout. It can also be a pair (tuple) of 2531 (connection, read) timeouts. 2532 :return: Returns the result object. 2533 If the method is called asynchronously, 2534 returns the request thread. 2535 :rtype: Credentials 2536 """ 2537 kwargs['_return_http_data_only'] = True 2538 if '_preload_content' in kwargs: 2539 raise ValueError("Error! Please call the get_credentials_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") 2540 return self.get_credentials_with_http_info(user_id, access_key_id, **kwargs) # noqa: E501 2541 2542 @validate_arguments 2543 def get_credentials_with_http_info(self, user_id : StrictStr, access_key_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 2544 """get credentials # noqa: E501 2545 2546 This method makes a synchronous HTTP request by default. To make an 2547 asynchronous HTTP request, please pass async_req=True 2548 2549 >>> thread = api.get_credentials_with_http_info(user_id, access_key_id, async_req=True) 2550 >>> result = thread.get() 2551 2552 :param user_id: (required) 2553 :type user_id: str 2554 :param access_key_id: (required) 2555 :type access_key_id: str 2556 :param async_req: Whether to execute the request asynchronously. 2557 :type async_req: bool, optional 2558 :param _preload_content: if False, the ApiResponse.data will 2559 be set to none and raw_data will store the 2560 HTTP response body without reading/decoding. 2561 Default is True. 2562 :type _preload_content: bool, optional 2563 :param _return_http_data_only: response data instead of ApiResponse 2564 object with status code, headers, etc 2565 :type _return_http_data_only: bool, optional 2566 :param _request_timeout: timeout setting for this request. If one 2567 number provided, it will be total request 2568 timeout. It can also be a pair (tuple) of 2569 (connection, read) timeouts. 2570 :param _request_auth: set to override the auth_settings for an a single 2571 request; this effectively ignores the authentication 2572 in the spec for a single request. 2573 :type _request_auth: dict, optional 2574 :type _content_type: string, optional: force content-type for the request 2575 :return: Returns the result object. 2576 If the method is called asynchronously, 2577 returns the request thread. 2578 :rtype: tuple(Credentials, status_code(int), headers(HTTPHeaderDict)) 2579 """ 2580 2581 _params = locals() 2582 2583 _all_params = [ 2584 'user_id', 2585 'access_key_id' 2586 ] 2587 _all_params.extend( 2588 [ 2589 'async_req', 2590 '_return_http_data_only', 2591 '_preload_content', 2592 '_request_timeout', 2593 '_request_auth', 2594 '_content_type', 2595 '_headers' 2596 ] 2597 ) 2598 2599 # validate the arguments 2600 for _key, _val in _params['kwargs'].items(): 2601 if _key not in _all_params: 2602 raise ApiTypeError( 2603 "Got an unexpected keyword argument '%s'" 2604 " to method get_credentials" % _key 2605 ) 2606 _params[_key] = _val 2607 del _params['kwargs'] 2608 2609 _collection_formats = {} 2610 2611 # process the path parameters 2612 _path_params = {} 2613 if _params['user_id']: 2614 _path_params['userId'] = _params['user_id'] 2615 2616 if _params['access_key_id']: 2617 _path_params['accessKeyId'] = _params['access_key_id'] 2618 2619 2620 # process the query parameters 2621 _query_params = [] 2622 # process the header parameters 2623 _header_params = dict(_params.get('_headers', {})) 2624 # process the form parameters 2625 _form_params = [] 2626 _files = {} 2627 # process the body parameter 2628 _body_params = None 2629 # set the HTTP header `Accept` 2630 _header_params['Accept'] = self.api_client.select_header_accept( 2631 ['application/json']) # noqa: E501 2632 2633 # authentication setting 2634 _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501 2635 2636 _response_types_map = { 2637 '200': "Credentials", 2638 '401': "Error", 2639 '404': "Error", 2640 '420': None, 2641 } 2642 2643 return self.api_client.call_api( 2644 '/auth/users/{userId}/credentials/{accessKeyId}', 'GET', 2645 _path_params, 2646 _query_params, 2647 _header_params, 2648 body=_body_params, 2649 post_params=_form_params, 2650 files=_files, 2651 response_types_map=_response_types_map, 2652 auth_settings=_auth_settings, 2653 async_req=_params.get('async_req'), 2654 _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 2655 _preload_content=_params.get('_preload_content', True), 2656 _request_timeout=_params.get('_request_timeout'), 2657 collection_formats=_collection_formats, 2658 _request_auth=_params.get('_request_auth')) 2659 2660 @validate_arguments 2661 def get_current_user(self, **kwargs) -> CurrentUser: # noqa: E501 2662 """get current user # noqa: E501 2663 2664 This method makes a synchronous HTTP request by default. To make an 2665 asynchronous HTTP request, please pass async_req=True 2666 2667 >>> thread = api.get_current_user(async_req=True) 2668 >>> result = thread.get() 2669 2670 :param async_req: Whether to execute the request asynchronously. 2671 :type async_req: bool, optional 2672 :param _request_timeout: timeout setting for this request. If one 2673 number provided, it will be total request 2674 timeout. It can also be a pair (tuple) of 2675 (connection, read) timeouts. 2676 :return: Returns the result object. 2677 If the method is called asynchronously, 2678 returns the request thread. 2679 :rtype: CurrentUser 2680 """ 2681 kwargs['_return_http_data_only'] = True 2682 if '_preload_content' in kwargs: 2683 raise ValueError("Error! Please call the get_current_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") 2684 return self.get_current_user_with_http_info(**kwargs) # noqa: E501 2685 2686 @validate_arguments 2687 def get_current_user_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 2688 """get current user # noqa: E501 2689 2690 This method makes a synchronous HTTP request by default. To make an 2691 asynchronous HTTP request, please pass async_req=True 2692 2693 >>> thread = api.get_current_user_with_http_info(async_req=True) 2694 >>> result = thread.get() 2695 2696 :param async_req: Whether to execute the request asynchronously. 2697 :type async_req: bool, optional 2698 :param _preload_content: if False, the ApiResponse.data will 2699 be set to none and raw_data will store the 2700 HTTP response body without reading/decoding. 2701 Default is True. 2702 :type _preload_content: bool, optional 2703 :param _return_http_data_only: response data instead of ApiResponse 2704 object with status code, headers, etc 2705 :type _return_http_data_only: bool, optional 2706 :param _request_timeout: timeout setting for this request. If one 2707 number provided, it will be total request 2708 timeout. It can also be a pair (tuple) of 2709 (connection, read) timeouts. 2710 :param _request_auth: set to override the auth_settings for an a single 2711 request; this effectively ignores the authentication 2712 in the spec for a single request. 2713 :type _request_auth: dict, optional 2714 :type _content_type: string, optional: force content-type for the request 2715 :return: Returns the result object. 2716 If the method is called asynchronously, 2717 returns the request thread. 2718 :rtype: tuple(CurrentUser, status_code(int), headers(HTTPHeaderDict)) 2719 """ 2720 2721 _params = locals() 2722 2723 _all_params = [ 2724 ] 2725 _all_params.extend( 2726 [ 2727 'async_req', 2728 '_return_http_data_only', 2729 '_preload_content', 2730 '_request_timeout', 2731 '_request_auth', 2732 '_content_type', 2733 '_headers' 2734 ] 2735 ) 2736 2737 # validate the arguments 2738 for _key, _val in _params['kwargs'].items(): 2739 if _key not in _all_params: 2740 raise ApiTypeError( 2741 "Got an unexpected keyword argument '%s'" 2742 " to method get_current_user" % _key 2743 ) 2744 _params[_key] = _val 2745 del _params['kwargs'] 2746 2747 _collection_formats = {} 2748 2749 # process the path parameters 2750 _path_params = {} 2751 2752 # process the query parameters 2753 _query_params = [] 2754 # process the header parameters 2755 _header_params = dict(_params.get('_headers', {})) 2756 # process the form parameters 2757 _form_params = [] 2758 _files = {} 2759 # process the body parameter 2760 _body_params = None 2761 # set the HTTP header `Accept` 2762 _header_params['Accept'] = self.api_client.select_header_accept( 2763 ['application/json']) # noqa: E501 2764 2765 # authentication setting 2766 _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501 2767 2768 _response_types_map = { 2769 '200': "CurrentUser", 2770 } 2771 2772 return self.api_client.call_api( 2773 '/user', 'GET', 2774 _path_params, 2775 _query_params, 2776 _header_params, 2777 body=_body_params, 2778 post_params=_form_params, 2779 files=_files, 2780 response_types_map=_response_types_map, 2781 auth_settings=_auth_settings, 2782 async_req=_params.get('async_req'), 2783 _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 2784 _preload_content=_params.get('_preload_content', True), 2785 _request_timeout=_params.get('_request_timeout'), 2786 collection_formats=_collection_formats, 2787 _request_auth=_params.get('_request_auth')) 2788 2789 @validate_arguments 2790 def get_external_principal(self, principal_id : StrictStr, **kwargs) -> ExternalPrincipal: # noqa: E501 2791 """describe external principal by id # noqa: E501 2792 2793 This method makes a synchronous HTTP request by default. To make an 2794 asynchronous HTTP request, please pass async_req=True 2795 2796 >>> thread = api.get_external_principal(principal_id, async_req=True) 2797 >>> result = thread.get() 2798 2799 :param principal_id: (required) 2800 :type principal_id: str 2801 :param async_req: Whether to execute the request asynchronously. 2802 :type async_req: bool, optional 2803 :param _request_timeout: timeout setting for this request. If one 2804 number provided, it will be total request 2805 timeout. It can also be a pair (tuple) of 2806 (connection, read) timeouts. 2807 :return: Returns the result object. 2808 If the method is called asynchronously, 2809 returns the request thread. 2810 :rtype: ExternalPrincipal 2811 """ 2812 kwargs['_return_http_data_only'] = True 2813 if '_preload_content' in kwargs: 2814 raise ValueError("Error! Please call the get_external_principal_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") 2815 return self.get_external_principal_with_http_info(principal_id, **kwargs) # noqa: E501 2816 2817 @validate_arguments 2818 def get_external_principal_with_http_info(self, principal_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 2819 """describe external principal by id # noqa: E501 2820 2821 This method makes a synchronous HTTP request by default. To make an 2822 asynchronous HTTP request, please pass async_req=True 2823 2824 >>> thread = api.get_external_principal_with_http_info(principal_id, async_req=True) 2825 >>> result = thread.get() 2826 2827 :param principal_id: (required) 2828 :type principal_id: str 2829 :param async_req: Whether to execute the request asynchronously. 2830 :type async_req: bool, optional 2831 :param _preload_content: if False, the ApiResponse.data will 2832 be set to none and raw_data will store the 2833 HTTP response body without reading/decoding. 2834 Default is True. 2835 :type _preload_content: bool, optional 2836 :param _return_http_data_only: response data instead of ApiResponse 2837 object with status code, headers, etc 2838 :type _return_http_data_only: bool, optional 2839 :param _request_timeout: timeout setting for this request. If one 2840 number provided, it will be total request 2841 timeout. It can also be a pair (tuple) of 2842 (connection, read) timeouts. 2843 :param _request_auth: set to override the auth_settings for an a single 2844 request; this effectively ignores the authentication 2845 in the spec for a single request. 2846 :type _request_auth: dict, optional 2847 :type _content_type: string, optional: force content-type for the request 2848 :return: Returns the result object. 2849 If the method is called asynchronously, 2850 returns the request thread. 2851 :rtype: tuple(ExternalPrincipal, status_code(int), headers(HTTPHeaderDict)) 2852 """ 2853 2854 _params = locals() 2855 2856 _all_params = [ 2857 'principal_id' 2858 ] 2859 _all_params.extend( 2860 [ 2861 'async_req', 2862 '_return_http_data_only', 2863 '_preload_content', 2864 '_request_timeout', 2865 '_request_auth', 2866 '_content_type', 2867 '_headers' 2868 ] 2869 ) 2870 2871 # validate the arguments 2872 for _key, _val in _params['kwargs'].items(): 2873 if _key not in _all_params: 2874 raise ApiTypeError( 2875 "Got an unexpected keyword argument '%s'" 2876 " to method get_external_principal" % _key 2877 ) 2878 _params[_key] = _val 2879 del _params['kwargs'] 2880 2881 _collection_formats = {} 2882 2883 # process the path parameters 2884 _path_params = {} 2885 2886 # process the query parameters 2887 _query_params = [] 2888 if _params.get('principal_id') is not None: # noqa: E501 2889 _query_params.append(('principalId', _params['principal_id'])) 2890 2891 # process the header parameters 2892 _header_params = dict(_params.get('_headers', {})) 2893 # process the form parameters 2894 _form_params = [] 2895 _files = {} 2896 # process the body parameter 2897 _body_params = None 2898 # set the HTTP header `Accept` 2899 _header_params['Accept'] = self.api_client.select_header_accept( 2900 ['application/json']) # noqa: E501 2901 2902 # authentication setting 2903 _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501 2904 2905 _response_types_map = { 2906 '200': "ExternalPrincipal", 2907 '401': "Error", 2908 '404': "Error", 2909 '420': None, 2910 } 2911 2912 return self.api_client.call_api( 2913 '/auth/external/principals', 'GET', 2914 _path_params, 2915 _query_params, 2916 _header_params, 2917 body=_body_params, 2918 post_params=_form_params, 2919 files=_files, 2920 response_types_map=_response_types_map, 2921 auth_settings=_auth_settings, 2922 async_req=_params.get('async_req'), 2923 _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 2924 _preload_content=_params.get('_preload_content', True), 2925 _request_timeout=_params.get('_request_timeout'), 2926 collection_formats=_collection_formats, 2927 _request_auth=_params.get('_request_auth')) 2928 2929 @validate_arguments 2930 def get_group(self, group_id : StrictStr, **kwargs) -> Group: # noqa: E501 2931 """get group # noqa: E501 2932 2933 This method makes a synchronous HTTP request by default. To make an 2934 asynchronous HTTP request, please pass async_req=True 2935 2936 >>> thread = api.get_group(group_id, async_req=True) 2937 >>> result = thread.get() 2938 2939 :param group_id: (required) 2940 :type group_id: str 2941 :param async_req: Whether to execute the request asynchronously. 2942 :type async_req: bool, optional 2943 :param _request_timeout: timeout setting for this request. If one 2944 number provided, it will be total request 2945 timeout. It can also be a pair (tuple) of 2946 (connection, read) timeouts. 2947 :return: Returns the result object. 2948 If the method is called asynchronously, 2949 returns the request thread. 2950 :rtype: Group 2951 """ 2952 kwargs['_return_http_data_only'] = True 2953 if '_preload_content' in kwargs: 2954 raise ValueError("Error! Please call the get_group_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") 2955 return self.get_group_with_http_info(group_id, **kwargs) # noqa: E501 2956 2957 @validate_arguments 2958 def get_group_with_http_info(self, group_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 2959 """get group # noqa: E501 2960 2961 This method makes a synchronous HTTP request by default. To make an 2962 asynchronous HTTP request, please pass async_req=True 2963 2964 >>> thread = api.get_group_with_http_info(group_id, async_req=True) 2965 >>> result = thread.get() 2966 2967 :param group_id: (required) 2968 :type group_id: str 2969 :param async_req: Whether to execute the request asynchronously. 2970 :type async_req: bool, optional 2971 :param _preload_content: if False, the ApiResponse.data will 2972 be set to none and raw_data will store the 2973 HTTP response body without reading/decoding. 2974 Default is True. 2975 :type _preload_content: bool, optional 2976 :param _return_http_data_only: response data instead of ApiResponse 2977 object with status code, headers, etc 2978 :type _return_http_data_only: bool, optional 2979 :param _request_timeout: timeout setting for this request. If one 2980 number provided, it will be total request 2981 timeout. It can also be a pair (tuple) of 2982 (connection, read) timeouts. 2983 :param _request_auth: set to override the auth_settings for an a single 2984 request; this effectively ignores the authentication 2985 in the spec for a single request. 2986 :type _request_auth: dict, optional 2987 :type _content_type: string, optional: force content-type for the request 2988 :return: Returns the result object. 2989 If the method is called asynchronously, 2990 returns the request thread. 2991 :rtype: tuple(Group, status_code(int), headers(HTTPHeaderDict)) 2992 """ 2993 2994 _params = locals() 2995 2996 _all_params = [ 2997 'group_id' 2998 ] 2999 _all_params.extend( 3000 [ 3001 'async_req', 3002 '_return_http_data_only', 3003 '_preload_content', 3004 '_request_timeout', 3005 '_request_auth', 3006 '_content_type', 3007 '_headers' 3008 ] 3009 ) 3010 3011 # validate the arguments 3012 for _key, _val in _params['kwargs'].items(): 3013 if _key not in _all_params: 3014 raise ApiTypeError( 3015 "Got an unexpected keyword argument '%s'" 3016 " to method get_group" % _key 3017 ) 3018 _params[_key] = _val 3019 del _params['kwargs'] 3020 3021 _collection_formats = {} 3022 3023 # process the path parameters 3024 _path_params = {} 3025 if _params['group_id']: 3026 _path_params['groupId'] = _params['group_id'] 3027 3028 3029 # process the query parameters 3030 _query_params = [] 3031 # process the header parameters 3032 _header_params = dict(_params.get('_headers', {})) 3033 # process the form parameters 3034 _form_params = [] 3035 _files = {} 3036 # process the body parameter 3037 _body_params = None 3038 # set the HTTP header `Accept` 3039 _header_params['Accept'] = self.api_client.select_header_accept( 3040 ['application/json']) # noqa: E501 3041 3042 # authentication setting 3043 _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501 3044 3045 _response_types_map = { 3046 '200': "Group", 3047 '401': "Error", 3048 '404': "Error", 3049 '420': None, 3050 } 3051 3052 return self.api_client.call_api( 3053 '/auth/groups/{groupId}', 'GET', 3054 _path_params, 3055 _query_params, 3056 _header_params, 3057 body=_body_params, 3058 post_params=_form_params, 3059 files=_files, 3060 response_types_map=_response_types_map, 3061 auth_settings=_auth_settings, 3062 async_req=_params.get('async_req'), 3063 _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 3064 _preload_content=_params.get('_preload_content', True), 3065 _request_timeout=_params.get('_request_timeout'), 3066 collection_formats=_collection_formats, 3067 _request_auth=_params.get('_request_auth')) 3068 3069 @validate_arguments 3070 def get_group_acl(self, group_id : StrictStr, **kwargs) -> ACL: # noqa: E501 3071 """get ACL of group # noqa: E501 3072 3073 This method makes a synchronous HTTP request by default. To make an 3074 asynchronous HTTP request, please pass async_req=True 3075 3076 >>> thread = api.get_group_acl(group_id, async_req=True) 3077 >>> result = thread.get() 3078 3079 :param group_id: (required) 3080 :type group_id: str 3081 :param async_req: Whether to execute the request asynchronously. 3082 :type async_req: bool, optional 3083 :param _request_timeout: timeout setting for this request. If one 3084 number provided, it will be total request 3085 timeout. It can also be a pair (tuple) of 3086 (connection, read) timeouts. 3087 :return: Returns the result object. 3088 If the method is called asynchronously, 3089 returns the request thread. 3090 :rtype: ACL 3091 """ 3092 kwargs['_return_http_data_only'] = True 3093 if '_preload_content' in kwargs: 3094 raise ValueError("Error! Please call the get_group_acl_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") 3095 return self.get_group_acl_with_http_info(group_id, **kwargs) # noqa: E501 3096 3097 @validate_arguments 3098 def get_group_acl_with_http_info(self, group_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 3099 """get ACL of group # noqa: E501 3100 3101 This method makes a synchronous HTTP request by default. To make an 3102 asynchronous HTTP request, please pass async_req=True 3103 3104 >>> thread = api.get_group_acl_with_http_info(group_id, async_req=True) 3105 >>> result = thread.get() 3106 3107 :param group_id: (required) 3108 :type group_id: str 3109 :param async_req: Whether to execute the request asynchronously. 3110 :type async_req: bool, optional 3111 :param _preload_content: if False, the ApiResponse.data will 3112 be set to none and raw_data will store the 3113 HTTP response body without reading/decoding. 3114 Default is True. 3115 :type _preload_content: bool, optional 3116 :param _return_http_data_only: response data instead of ApiResponse 3117 object with status code, headers, etc 3118 :type _return_http_data_only: bool, optional 3119 :param _request_timeout: timeout setting for this request. If one 3120 number provided, it will be total request 3121 timeout. It can also be a pair (tuple) of 3122 (connection, read) timeouts. 3123 :param _request_auth: set to override the auth_settings for an a single 3124 request; this effectively ignores the authentication 3125 in the spec for a single request. 3126 :type _request_auth: dict, optional 3127 :type _content_type: string, optional: force content-type for the request 3128 :return: Returns the result object. 3129 If the method is called asynchronously, 3130 returns the request thread. 3131 :rtype: tuple(ACL, status_code(int), headers(HTTPHeaderDict)) 3132 """ 3133 3134 _params = locals() 3135 3136 _all_params = [ 3137 'group_id' 3138 ] 3139 _all_params.extend( 3140 [ 3141 'async_req', 3142 '_return_http_data_only', 3143 '_preload_content', 3144 '_request_timeout', 3145 '_request_auth', 3146 '_content_type', 3147 '_headers' 3148 ] 3149 ) 3150 3151 # validate the arguments 3152 for _key, _val in _params['kwargs'].items(): 3153 if _key not in _all_params: 3154 raise ApiTypeError( 3155 "Got an unexpected keyword argument '%s'" 3156 " to method get_group_acl" % _key 3157 ) 3158 _params[_key] = _val 3159 del _params['kwargs'] 3160 3161 _collection_formats = {} 3162 3163 # process the path parameters 3164 _path_params = {} 3165 if _params['group_id']: 3166 _path_params['groupId'] = _params['group_id'] 3167 3168 3169 # process the query parameters 3170 _query_params = [] 3171 # process the header parameters 3172 _header_params = dict(_params.get('_headers', {})) 3173 # process the form parameters 3174 _form_params = [] 3175 _files = {} 3176 # process the body parameter 3177 _body_params = None 3178 # set the HTTP header `Accept` 3179 _header_params['Accept'] = self.api_client.select_header_accept( 3180 ['application/json']) # noqa: E501 3181 3182 # authentication setting 3183 _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501 3184 3185 _response_types_map = { 3186 '200': "ACL", 3187 '401': "Error", 3188 '404': "ErrorNoACL", 3189 '420': None, 3190 } 3191 3192 return self.api_client.call_api( 3193 '/auth/groups/{groupId}/acl', 'GET', 3194 _path_params, 3195 _query_params, 3196 _header_params, 3197 body=_body_params, 3198 post_params=_form_params, 3199 files=_files, 3200 response_types_map=_response_types_map, 3201 auth_settings=_auth_settings, 3202 async_req=_params.get('async_req'), 3203 _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 3204 _preload_content=_params.get('_preload_content', True), 3205 _request_timeout=_params.get('_request_timeout'), 3206 collection_formats=_collection_formats, 3207 _request_auth=_params.get('_request_auth')) 3208 3209 @validate_arguments 3210 def get_policy(self, policy_id : StrictStr, **kwargs) -> Policy: # noqa: E501 3211 """get policy # noqa: E501 3212 3213 This method makes a synchronous HTTP request by default. To make an 3214 asynchronous HTTP request, please pass async_req=True 3215 3216 >>> thread = api.get_policy(policy_id, async_req=True) 3217 >>> result = thread.get() 3218 3219 :param policy_id: (required) 3220 :type policy_id: str 3221 :param async_req: Whether to execute the request asynchronously. 3222 :type async_req: bool, optional 3223 :param _request_timeout: timeout setting for this request. If one 3224 number provided, it will be total request 3225 timeout. It can also be a pair (tuple) of 3226 (connection, read) timeouts. 3227 :return: Returns the result object. 3228 If the method is called asynchronously, 3229 returns the request thread. 3230 :rtype: Policy 3231 """ 3232 kwargs['_return_http_data_only'] = True 3233 if '_preload_content' in kwargs: 3234 raise ValueError("Error! Please call the get_policy_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") 3235 return self.get_policy_with_http_info(policy_id, **kwargs) # noqa: E501 3236 3237 @validate_arguments 3238 def get_policy_with_http_info(self, policy_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 3239 """get policy # noqa: E501 3240 3241 This method makes a synchronous HTTP request by default. To make an 3242 asynchronous HTTP request, please pass async_req=True 3243 3244 >>> thread = api.get_policy_with_http_info(policy_id, async_req=True) 3245 >>> result = thread.get() 3246 3247 :param policy_id: (required) 3248 :type policy_id: str 3249 :param async_req: Whether to execute the request asynchronously. 3250 :type async_req: bool, optional 3251 :param _preload_content: if False, the ApiResponse.data will 3252 be set to none and raw_data will store the 3253 HTTP response body without reading/decoding. 3254 Default is True. 3255 :type _preload_content: bool, optional 3256 :param _return_http_data_only: response data instead of ApiResponse 3257 object with status code, headers, etc 3258 :type _return_http_data_only: bool, optional 3259 :param _request_timeout: timeout setting for this request. If one 3260 number provided, it will be total request 3261 timeout. It can also be a pair (tuple) of 3262 (connection, read) timeouts. 3263 :param _request_auth: set to override the auth_settings for an a single 3264 request; this effectively ignores the authentication 3265 in the spec for a single request. 3266 :type _request_auth: dict, optional 3267 :type _content_type: string, optional: force content-type for the request 3268 :return: Returns the result object. 3269 If the method is called asynchronously, 3270 returns the request thread. 3271 :rtype: tuple(Policy, status_code(int), headers(HTTPHeaderDict)) 3272 """ 3273 3274 _params = locals() 3275 3276 _all_params = [ 3277 'policy_id' 3278 ] 3279 _all_params.extend( 3280 [ 3281 'async_req', 3282 '_return_http_data_only', 3283 '_preload_content', 3284 '_request_timeout', 3285 '_request_auth', 3286 '_content_type', 3287 '_headers' 3288 ] 3289 ) 3290 3291 # validate the arguments 3292 for _key, _val in _params['kwargs'].items(): 3293 if _key not in _all_params: 3294 raise ApiTypeError( 3295 "Got an unexpected keyword argument '%s'" 3296 " to method get_policy" % _key 3297 ) 3298 _params[_key] = _val 3299 del _params['kwargs'] 3300 3301 _collection_formats = {} 3302 3303 # process the path parameters 3304 _path_params = {} 3305 if _params['policy_id']: 3306 _path_params['policyId'] = _params['policy_id'] 3307 3308 3309 # process the query parameters 3310 _query_params = [] 3311 # process the header parameters 3312 _header_params = dict(_params.get('_headers', {})) 3313 # process the form parameters 3314 _form_params = [] 3315 _files = {} 3316 # process the body parameter 3317 _body_params = None 3318 # set the HTTP header `Accept` 3319 _header_params['Accept'] = self.api_client.select_header_accept( 3320 ['application/json']) # noqa: E501 3321 3322 # authentication setting 3323 _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501 3324 3325 _response_types_map = { 3326 '200': "Policy", 3327 '401': "Error", 3328 '404': "Error", 3329 '420': None, 3330 } 3331 3332 return self.api_client.call_api( 3333 '/auth/policies/{policyId}', 'GET', 3334 _path_params, 3335 _query_params, 3336 _header_params, 3337 body=_body_params, 3338 post_params=_form_params, 3339 files=_files, 3340 response_types_map=_response_types_map, 3341 auth_settings=_auth_settings, 3342 async_req=_params.get('async_req'), 3343 _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 3344 _preload_content=_params.get('_preload_content', True), 3345 _request_timeout=_params.get('_request_timeout'), 3346 collection_formats=_collection_formats, 3347 _request_auth=_params.get('_request_auth')) 3348 3349 @validate_arguments 3350 def get_user(self, user_id : StrictStr, **kwargs) -> User: # noqa: E501 3351 """get user # noqa: E501 3352 3353 This method makes a synchronous HTTP request by default. To make an 3354 asynchronous HTTP request, please pass async_req=True 3355 3356 >>> thread = api.get_user(user_id, async_req=True) 3357 >>> result = thread.get() 3358 3359 :param user_id: (required) 3360 :type user_id: str 3361 :param async_req: Whether to execute the request asynchronously. 3362 :type async_req: bool, optional 3363 :param _request_timeout: timeout setting for this request. If one 3364 number provided, it will be total request 3365 timeout. It can also be a pair (tuple) of 3366 (connection, read) timeouts. 3367 :return: Returns the result object. 3368 If the method is called asynchronously, 3369 returns the request thread. 3370 :rtype: User 3371 """ 3372 kwargs['_return_http_data_only'] = True 3373 if '_preload_content' in kwargs: 3374 raise ValueError("Error! Please call the get_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") 3375 return self.get_user_with_http_info(user_id, **kwargs) # noqa: E501 3376 3377 @validate_arguments 3378 def get_user_with_http_info(self, user_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 3379 """get user # noqa: E501 3380 3381 This method makes a synchronous HTTP request by default. To make an 3382 asynchronous HTTP request, please pass async_req=True 3383 3384 >>> thread = api.get_user_with_http_info(user_id, async_req=True) 3385 >>> result = thread.get() 3386 3387 :param user_id: (required) 3388 :type user_id: str 3389 :param async_req: Whether to execute the request asynchronously. 3390 :type async_req: bool, optional 3391 :param _preload_content: if False, the ApiResponse.data will 3392 be set to none and raw_data will store the 3393 HTTP response body without reading/decoding. 3394 Default is True. 3395 :type _preload_content: bool, optional 3396 :param _return_http_data_only: response data instead of ApiResponse 3397 object with status code, headers, etc 3398 :type _return_http_data_only: bool, optional 3399 :param _request_timeout: timeout setting for this request. If one 3400 number provided, it will be total request 3401 timeout. It can also be a pair (tuple) of 3402 (connection, read) timeouts. 3403 :param _request_auth: set to override the auth_settings for an a single 3404 request; this effectively ignores the authentication 3405 in the spec for a single request. 3406 :type _request_auth: dict, optional 3407 :type _content_type: string, optional: force content-type for the request 3408 :return: Returns the result object. 3409 If the method is called asynchronously, 3410 returns the request thread. 3411 :rtype: tuple(User, status_code(int), headers(HTTPHeaderDict)) 3412 """ 3413 3414 _params = locals() 3415 3416 _all_params = [ 3417 'user_id' 3418 ] 3419 _all_params.extend( 3420 [ 3421 'async_req', 3422 '_return_http_data_only', 3423 '_preload_content', 3424 '_request_timeout', 3425 '_request_auth', 3426 '_content_type', 3427 '_headers' 3428 ] 3429 ) 3430 3431 # validate the arguments 3432 for _key, _val in _params['kwargs'].items(): 3433 if _key not in _all_params: 3434 raise ApiTypeError( 3435 "Got an unexpected keyword argument '%s'" 3436 " to method get_user" % _key 3437 ) 3438 _params[_key] = _val 3439 del _params['kwargs'] 3440 3441 _collection_formats = {} 3442 3443 # process the path parameters 3444 _path_params = {} 3445 if _params['user_id']: 3446 _path_params['userId'] = _params['user_id'] 3447 3448 3449 # process the query parameters 3450 _query_params = [] 3451 # process the header parameters 3452 _header_params = dict(_params.get('_headers', {})) 3453 # process the form parameters 3454 _form_params = [] 3455 _files = {} 3456 # process the body parameter 3457 _body_params = None 3458 # set the HTTP header `Accept` 3459 _header_params['Accept'] = self.api_client.select_header_accept( 3460 ['application/json']) # noqa: E501 3461 3462 # authentication setting 3463 _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501 3464 3465 _response_types_map = { 3466 '200': "User", 3467 '401': "Error", 3468 '404': "Error", 3469 '420': None, 3470 } 3471 3472 return self.api_client.call_api( 3473 '/auth/users/{userId}', 'GET', 3474 _path_params, 3475 _query_params, 3476 _header_params, 3477 body=_body_params, 3478 post_params=_form_params, 3479 files=_files, 3480 response_types_map=_response_types_map, 3481 auth_settings=_auth_settings, 3482 async_req=_params.get('async_req'), 3483 _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 3484 _preload_content=_params.get('_preload_content', True), 3485 _request_timeout=_params.get('_request_timeout'), 3486 collection_formats=_collection_formats, 3487 _request_auth=_params.get('_request_auth')) 3488 3489 @validate_arguments 3490 def list_group_members(self, group_id : StrictStr, prefix : Annotated[Optional[StrictStr], Field(description="return items prefixed with this value")] = None, after : Annotated[Optional[StrictStr], Field(description="return items after this value")] = None, amount : Annotated[Optional[conint(strict=True, le=1000, ge=-1)], Field(description="how many items to return")] = None, **kwargs) -> UserList: # noqa: E501 3491 """list group members # noqa: E501 3492 3493 This method makes a synchronous HTTP request by default. To make an 3494 asynchronous HTTP request, please pass async_req=True 3495 3496 >>> thread = api.list_group_members(group_id, prefix, after, amount, async_req=True) 3497 >>> result = thread.get() 3498 3499 :param group_id: (required) 3500 :type group_id: str 3501 :param prefix: return items prefixed with this value 3502 :type prefix: str 3503 :param after: return items after this value 3504 :type after: str 3505 :param amount: how many items to return 3506 :type amount: int 3507 :param async_req: Whether to execute the request asynchronously. 3508 :type async_req: bool, optional 3509 :param _request_timeout: timeout setting for this request. If one 3510 number provided, it will be total request 3511 timeout. It can also be a pair (tuple) of 3512 (connection, read) timeouts. 3513 :return: Returns the result object. 3514 If the method is called asynchronously, 3515 returns the request thread. 3516 :rtype: UserList 3517 """ 3518 kwargs['_return_http_data_only'] = True 3519 if '_preload_content' in kwargs: 3520 raise ValueError("Error! Please call the list_group_members_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") 3521 return self.list_group_members_with_http_info(group_id, prefix, after, amount, **kwargs) # noqa: E501 3522 3523 @validate_arguments 3524 def list_group_members_with_http_info(self, group_id : StrictStr, prefix : Annotated[Optional[StrictStr], Field(description="return items prefixed with this value")] = None, after : Annotated[Optional[StrictStr], Field(description="return items after this value")] = None, amount : Annotated[Optional[conint(strict=True, le=1000, ge=-1)], Field(description="how many items to return")] = None, **kwargs) -> ApiResponse: # noqa: E501 3525 """list group members # noqa: E501 3526 3527 This method makes a synchronous HTTP request by default. To make an 3528 asynchronous HTTP request, please pass async_req=True 3529 3530 >>> thread = api.list_group_members_with_http_info(group_id, prefix, after, amount, async_req=True) 3531 >>> result = thread.get() 3532 3533 :param group_id: (required) 3534 :type group_id: str 3535 :param prefix: return items prefixed with this value 3536 :type prefix: str 3537 :param after: return items after this value 3538 :type after: str 3539 :param amount: how many items to return 3540 :type amount: int 3541 :param async_req: Whether to execute the request asynchronously. 3542 :type async_req: bool, optional 3543 :param _preload_content: if False, the ApiResponse.data will 3544 be set to none and raw_data will store the 3545 HTTP response body without reading/decoding. 3546 Default is True. 3547 :type _preload_content: bool, optional 3548 :param _return_http_data_only: response data instead of ApiResponse 3549 object with status code, headers, etc 3550 :type _return_http_data_only: bool, optional 3551 :param _request_timeout: timeout setting for this request. If one 3552 number provided, it will be total request 3553 timeout. It can also be a pair (tuple) of 3554 (connection, read) timeouts. 3555 :param _request_auth: set to override the auth_settings for an a single 3556 request; this effectively ignores the authentication 3557 in the spec for a single request. 3558 :type _request_auth: dict, optional 3559 :type _content_type: string, optional: force content-type for the request 3560 :return: Returns the result object. 3561 If the method is called asynchronously, 3562 returns the request thread. 3563 :rtype: tuple(UserList, status_code(int), headers(HTTPHeaderDict)) 3564 """ 3565 3566 _params = locals() 3567 3568 _all_params = [ 3569 'group_id', 3570 'prefix', 3571 'after', 3572 'amount' 3573 ] 3574 _all_params.extend( 3575 [ 3576 'async_req', 3577 '_return_http_data_only', 3578 '_preload_content', 3579 '_request_timeout', 3580 '_request_auth', 3581 '_content_type', 3582 '_headers' 3583 ] 3584 ) 3585 3586 # validate the arguments 3587 for _key, _val in _params['kwargs'].items(): 3588 if _key not in _all_params: 3589 raise ApiTypeError( 3590 "Got an unexpected keyword argument '%s'" 3591 " to method list_group_members" % _key 3592 ) 3593 _params[_key] = _val 3594 del _params['kwargs'] 3595 3596 _collection_formats = {} 3597 3598 # process the path parameters 3599 _path_params = {} 3600 if _params['group_id']: 3601 _path_params['groupId'] = _params['group_id'] 3602 3603 3604 # process the query parameters 3605 _query_params = [] 3606 if _params.get('prefix') is not None: # noqa: E501 3607 _query_params.append(('prefix', _params['prefix'])) 3608 3609 if _params.get('after') is not None: # noqa: E501 3610 _query_params.append(('after', _params['after'])) 3611 3612 if _params.get('amount') is not None: # noqa: E501 3613 _query_params.append(('amount', _params['amount'])) 3614 3615 # process the header parameters 3616 _header_params = dict(_params.get('_headers', {})) 3617 # process the form parameters 3618 _form_params = [] 3619 _files = {} 3620 # process the body parameter 3621 _body_params = None 3622 # set the HTTP header `Accept` 3623 _header_params['Accept'] = self.api_client.select_header_accept( 3624 ['application/json']) # noqa: E501 3625 3626 # authentication setting 3627 _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501 3628 3629 _response_types_map = { 3630 '200': "UserList", 3631 '401': "Error", 3632 '420': None, 3633 } 3634 3635 return self.api_client.call_api( 3636 '/auth/groups/{groupId}/members', 'GET', 3637 _path_params, 3638 _query_params, 3639 _header_params, 3640 body=_body_params, 3641 post_params=_form_params, 3642 files=_files, 3643 response_types_map=_response_types_map, 3644 auth_settings=_auth_settings, 3645 async_req=_params.get('async_req'), 3646 _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 3647 _preload_content=_params.get('_preload_content', True), 3648 _request_timeout=_params.get('_request_timeout'), 3649 collection_formats=_collection_formats, 3650 _request_auth=_params.get('_request_auth')) 3651 3652 @validate_arguments 3653 def list_group_policies(self, group_id : StrictStr, prefix : Annotated[Optional[StrictStr], Field(description="return items prefixed with this value")] = None, after : Annotated[Optional[StrictStr], Field(description="return items after this value")] = None, amount : Annotated[Optional[conint(strict=True, le=1000, ge=-1)], Field(description="how many items to return")] = None, **kwargs) -> PolicyList: # noqa: E501 3654 """list group policies # noqa: E501 3655 3656 This method makes a synchronous HTTP request by default. To make an 3657 asynchronous HTTP request, please pass async_req=True 3658 3659 >>> thread = api.list_group_policies(group_id, prefix, after, amount, async_req=True) 3660 >>> result = thread.get() 3661 3662 :param group_id: (required) 3663 :type group_id: str 3664 :param prefix: return items prefixed with this value 3665 :type prefix: str 3666 :param after: return items after this value 3667 :type after: str 3668 :param amount: how many items to return 3669 :type amount: int 3670 :param async_req: Whether to execute the request asynchronously. 3671 :type async_req: bool, optional 3672 :param _request_timeout: timeout setting for this request. If one 3673 number provided, it will be total request 3674 timeout. It can also be a pair (tuple) of 3675 (connection, read) timeouts. 3676 :return: Returns the result object. 3677 If the method is called asynchronously, 3678 returns the request thread. 3679 :rtype: PolicyList 3680 """ 3681 kwargs['_return_http_data_only'] = True 3682 if '_preload_content' in kwargs: 3683 raise ValueError("Error! Please call the list_group_policies_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") 3684 return self.list_group_policies_with_http_info(group_id, prefix, after, amount, **kwargs) # noqa: E501 3685 3686 @validate_arguments 3687 def list_group_policies_with_http_info(self, group_id : StrictStr, prefix : Annotated[Optional[StrictStr], Field(description="return items prefixed with this value")] = None, after : Annotated[Optional[StrictStr], Field(description="return items after this value")] = None, amount : Annotated[Optional[conint(strict=True, le=1000, ge=-1)], Field(description="how many items to return")] = None, **kwargs) -> ApiResponse: # noqa: E501 3688 """list group policies # noqa: E501 3689 3690 This method makes a synchronous HTTP request by default. To make an 3691 asynchronous HTTP request, please pass async_req=True 3692 3693 >>> thread = api.list_group_policies_with_http_info(group_id, prefix, after, amount, async_req=True) 3694 >>> result = thread.get() 3695 3696 :param group_id: (required) 3697 :type group_id: str 3698 :param prefix: return items prefixed with this value 3699 :type prefix: str 3700 :param after: return items after this value 3701 :type after: str 3702 :param amount: how many items to return 3703 :type amount: int 3704 :param async_req: Whether to execute the request asynchronously. 3705 :type async_req: bool, optional 3706 :param _preload_content: if False, the ApiResponse.data will 3707 be set to none and raw_data will store the 3708 HTTP response body without reading/decoding. 3709 Default is True. 3710 :type _preload_content: bool, optional 3711 :param _return_http_data_only: response data instead of ApiResponse 3712 object with status code, headers, etc 3713 :type _return_http_data_only: bool, optional 3714 :param _request_timeout: timeout setting for this request. If one 3715 number provided, it will be total request 3716 timeout. It can also be a pair (tuple) of 3717 (connection, read) timeouts. 3718 :param _request_auth: set to override the auth_settings for an a single 3719 request; this effectively ignores the authentication 3720 in the spec for a single request. 3721 :type _request_auth: dict, optional 3722 :type _content_type: string, optional: force content-type for the request 3723 :return: Returns the result object. 3724 If the method is called asynchronously, 3725 returns the request thread. 3726 :rtype: tuple(PolicyList, status_code(int), headers(HTTPHeaderDict)) 3727 """ 3728 3729 _params = locals() 3730 3731 _all_params = [ 3732 'group_id', 3733 'prefix', 3734 'after', 3735 'amount' 3736 ] 3737 _all_params.extend( 3738 [ 3739 'async_req', 3740 '_return_http_data_only', 3741 '_preload_content', 3742 '_request_timeout', 3743 '_request_auth', 3744 '_content_type', 3745 '_headers' 3746 ] 3747 ) 3748 3749 # validate the arguments 3750 for _key, _val in _params['kwargs'].items(): 3751 if _key not in _all_params: 3752 raise ApiTypeError( 3753 "Got an unexpected keyword argument '%s'" 3754 " to method list_group_policies" % _key 3755 ) 3756 _params[_key] = _val 3757 del _params['kwargs'] 3758 3759 _collection_formats = {} 3760 3761 # process the path parameters 3762 _path_params = {} 3763 if _params['group_id']: 3764 _path_params['groupId'] = _params['group_id'] 3765 3766 3767 # process the query parameters 3768 _query_params = [] 3769 if _params.get('prefix') is not None: # noqa: E501 3770 _query_params.append(('prefix', _params['prefix'])) 3771 3772 if _params.get('after') is not None: # noqa: E501 3773 _query_params.append(('after', _params['after'])) 3774 3775 if _params.get('amount') is not None: # noqa: E501 3776 _query_params.append(('amount', _params['amount'])) 3777 3778 # process the header parameters 3779 _header_params = dict(_params.get('_headers', {})) 3780 # process the form parameters 3781 _form_params = [] 3782 _files = {} 3783 # process the body parameter 3784 _body_params = None 3785 # set the HTTP header `Accept` 3786 _header_params['Accept'] = self.api_client.select_header_accept( 3787 ['application/json']) # noqa: E501 3788 3789 # authentication setting 3790 _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501 3791 3792 _response_types_map = { 3793 '200': "PolicyList", 3794 '401': "Error", 3795 '404': "Error", 3796 '420': None, 3797 } 3798 3799 return self.api_client.call_api( 3800 '/auth/groups/{groupId}/policies', 'GET', 3801 _path_params, 3802 _query_params, 3803 _header_params, 3804 body=_body_params, 3805 post_params=_form_params, 3806 files=_files, 3807 response_types_map=_response_types_map, 3808 auth_settings=_auth_settings, 3809 async_req=_params.get('async_req'), 3810 _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 3811 _preload_content=_params.get('_preload_content', True), 3812 _request_timeout=_params.get('_request_timeout'), 3813 collection_formats=_collection_formats, 3814 _request_auth=_params.get('_request_auth')) 3815 3816 @validate_arguments 3817 def list_groups(self, prefix : Annotated[Optional[StrictStr], Field(description="return items prefixed with this value")] = None, after : Annotated[Optional[StrictStr], Field(description="return items after this value")] = None, amount : Annotated[Optional[conint(strict=True, le=1000, ge=-1)], Field(description="how many items to return")] = None, **kwargs) -> GroupList: # noqa: E501 3818 """list groups # noqa: E501 3819 3820 This method makes a synchronous HTTP request by default. To make an 3821 asynchronous HTTP request, please pass async_req=True 3822 3823 >>> thread = api.list_groups(prefix, after, amount, async_req=True) 3824 >>> result = thread.get() 3825 3826 :param prefix: return items prefixed with this value 3827 :type prefix: str 3828 :param after: return items after this value 3829 :type after: str 3830 :param amount: how many items to return 3831 :type amount: int 3832 :param async_req: Whether to execute the request asynchronously. 3833 :type async_req: bool, optional 3834 :param _request_timeout: timeout setting for this request. If one 3835 number provided, it will be total request 3836 timeout. It can also be a pair (tuple) of 3837 (connection, read) timeouts. 3838 :return: Returns the result object. 3839 If the method is called asynchronously, 3840 returns the request thread. 3841 :rtype: GroupList 3842 """ 3843 kwargs['_return_http_data_only'] = True 3844 if '_preload_content' in kwargs: 3845 raise ValueError("Error! Please call the list_groups_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") 3846 return self.list_groups_with_http_info(prefix, after, amount, **kwargs) # noqa: E501 3847 3848 @validate_arguments 3849 def list_groups_with_http_info(self, prefix : Annotated[Optional[StrictStr], Field(description="return items prefixed with this value")] = None, after : Annotated[Optional[StrictStr], Field(description="return items after this value")] = None, amount : Annotated[Optional[conint(strict=True, le=1000, ge=-1)], Field(description="how many items to return")] = None, **kwargs) -> ApiResponse: # noqa: E501 3850 """list groups # noqa: E501 3851 3852 This method makes a synchronous HTTP request by default. To make an 3853 asynchronous HTTP request, please pass async_req=True 3854 3855 >>> thread = api.list_groups_with_http_info(prefix, after, amount, async_req=True) 3856 >>> result = thread.get() 3857 3858 :param prefix: return items prefixed with this value 3859 :type prefix: str 3860 :param after: return items after this value 3861 :type after: str 3862 :param amount: how many items to return 3863 :type amount: int 3864 :param async_req: Whether to execute the request asynchronously. 3865 :type async_req: bool, optional 3866 :param _preload_content: if False, the ApiResponse.data will 3867 be set to none and raw_data will store the 3868 HTTP response body without reading/decoding. 3869 Default is True. 3870 :type _preload_content: bool, optional 3871 :param _return_http_data_only: response data instead of ApiResponse 3872 object with status code, headers, etc 3873 :type _return_http_data_only: bool, optional 3874 :param _request_timeout: timeout setting for this request. If one 3875 number provided, it will be total request 3876 timeout. It can also be a pair (tuple) of 3877 (connection, read) timeouts. 3878 :param _request_auth: set to override the auth_settings for an a single 3879 request; this effectively ignores the authentication 3880 in the spec for a single request. 3881 :type _request_auth: dict, optional 3882 :type _content_type: string, optional: force content-type for the request 3883 :return: Returns the result object. 3884 If the method is called asynchronously, 3885 returns the request thread. 3886 :rtype: tuple(GroupList, status_code(int), headers(HTTPHeaderDict)) 3887 """ 3888 3889 _params = locals() 3890 3891 _all_params = [ 3892 'prefix', 3893 'after', 3894 'amount' 3895 ] 3896 _all_params.extend( 3897 [ 3898 'async_req', 3899 '_return_http_data_only', 3900 '_preload_content', 3901 '_request_timeout', 3902 '_request_auth', 3903 '_content_type', 3904 '_headers' 3905 ] 3906 ) 3907 3908 # validate the arguments 3909 for _key, _val in _params['kwargs'].items(): 3910 if _key not in _all_params: 3911 raise ApiTypeError( 3912 "Got an unexpected keyword argument '%s'" 3913 " to method list_groups" % _key 3914 ) 3915 _params[_key] = _val 3916 del _params['kwargs'] 3917 3918 _collection_formats = {} 3919 3920 # process the path parameters 3921 _path_params = {} 3922 3923 # process the query parameters 3924 _query_params = [] 3925 if _params.get('prefix') is not None: # noqa: E501 3926 _query_params.append(('prefix', _params['prefix'])) 3927 3928 if _params.get('after') is not None: # noqa: E501 3929 _query_params.append(('after', _params['after'])) 3930 3931 if _params.get('amount') is not None: # noqa: E501 3932 _query_params.append(('amount', _params['amount'])) 3933 3934 # process the header parameters 3935 _header_params = dict(_params.get('_headers', {})) 3936 # process the form parameters 3937 _form_params = [] 3938 _files = {} 3939 # process the body parameter 3940 _body_params = None 3941 # set the HTTP header `Accept` 3942 _header_params['Accept'] = self.api_client.select_header_accept( 3943 ['application/json']) # noqa: E501 3944 3945 # authentication setting 3946 _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501 3947 3948 _response_types_map = { 3949 '200': "GroupList", 3950 '401': "Error", 3951 '420': None, 3952 } 3953 3954 return self.api_client.call_api( 3955 '/auth/groups', 'GET', 3956 _path_params, 3957 _query_params, 3958 _header_params, 3959 body=_body_params, 3960 post_params=_form_params, 3961 files=_files, 3962 response_types_map=_response_types_map, 3963 auth_settings=_auth_settings, 3964 async_req=_params.get('async_req'), 3965 _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 3966 _preload_content=_params.get('_preload_content', True), 3967 _request_timeout=_params.get('_request_timeout'), 3968 collection_formats=_collection_formats, 3969 _request_auth=_params.get('_request_auth')) 3970 3971 @validate_arguments 3972 def list_policies(self, prefix : Annotated[Optional[StrictStr], Field(description="return items prefixed with this value")] = None, after : Annotated[Optional[StrictStr], Field(description="return items after this value")] = None, amount : Annotated[Optional[conint(strict=True, le=1000, ge=-1)], Field(description="how many items to return")] = None, **kwargs) -> PolicyList: # noqa: E501 3973 """list policies # noqa: E501 3974 3975 This method makes a synchronous HTTP request by default. To make an 3976 asynchronous HTTP request, please pass async_req=True 3977 3978 >>> thread = api.list_policies(prefix, after, amount, async_req=True) 3979 >>> result = thread.get() 3980 3981 :param prefix: return items prefixed with this value 3982 :type prefix: str 3983 :param after: return items after this value 3984 :type after: str 3985 :param amount: how many items to return 3986 :type amount: int 3987 :param async_req: Whether to execute the request asynchronously. 3988 :type async_req: bool, optional 3989 :param _request_timeout: timeout setting for this request. If one 3990 number provided, it will be total request 3991 timeout. It can also be a pair (tuple) of 3992 (connection, read) timeouts. 3993 :return: Returns the result object. 3994 If the method is called asynchronously, 3995 returns the request thread. 3996 :rtype: PolicyList 3997 """ 3998 kwargs['_return_http_data_only'] = True 3999 if '_preload_content' in kwargs: 4000 raise ValueError("Error! Please call the list_policies_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") 4001 return self.list_policies_with_http_info(prefix, after, amount, **kwargs) # noqa: E501 4002 4003 @validate_arguments 4004 def list_policies_with_http_info(self, prefix : Annotated[Optional[StrictStr], Field(description="return items prefixed with this value")] = None, after : Annotated[Optional[StrictStr], Field(description="return items after this value")] = None, amount : Annotated[Optional[conint(strict=True, le=1000, ge=-1)], Field(description="how many items to return")] = None, **kwargs) -> ApiResponse: # noqa: E501 4005 """list policies # noqa: E501 4006 4007 This method makes a synchronous HTTP request by default. To make an 4008 asynchronous HTTP request, please pass async_req=True 4009 4010 >>> thread = api.list_policies_with_http_info(prefix, after, amount, async_req=True) 4011 >>> result = thread.get() 4012 4013 :param prefix: return items prefixed with this value 4014 :type prefix: str 4015 :param after: return items after this value 4016 :type after: str 4017 :param amount: how many items to return 4018 :type amount: int 4019 :param async_req: Whether to execute the request asynchronously. 4020 :type async_req: bool, optional 4021 :param _preload_content: if False, the ApiResponse.data will 4022 be set to none and raw_data will store the 4023 HTTP response body without reading/decoding. 4024 Default is True. 4025 :type _preload_content: bool, optional 4026 :param _return_http_data_only: response data instead of ApiResponse 4027 object with status code, headers, etc 4028 :type _return_http_data_only: bool, optional 4029 :param _request_timeout: timeout setting for this request. If one 4030 number provided, it will be total request 4031 timeout. It can also be a pair (tuple) of 4032 (connection, read) timeouts. 4033 :param _request_auth: set to override the auth_settings for an a single 4034 request; this effectively ignores the authentication 4035 in the spec for a single request. 4036 :type _request_auth: dict, optional 4037 :type _content_type: string, optional: force content-type for the request 4038 :return: Returns the result object. 4039 If the method is called asynchronously, 4040 returns the request thread. 4041 :rtype: tuple(PolicyList, status_code(int), headers(HTTPHeaderDict)) 4042 """ 4043 4044 _params = locals() 4045 4046 _all_params = [ 4047 'prefix', 4048 'after', 4049 'amount' 4050 ] 4051 _all_params.extend( 4052 [ 4053 'async_req', 4054 '_return_http_data_only', 4055 '_preload_content', 4056 '_request_timeout', 4057 '_request_auth', 4058 '_content_type', 4059 '_headers' 4060 ] 4061 ) 4062 4063 # validate the arguments 4064 for _key, _val in _params['kwargs'].items(): 4065 if _key not in _all_params: 4066 raise ApiTypeError( 4067 "Got an unexpected keyword argument '%s'" 4068 " to method list_policies" % _key 4069 ) 4070 _params[_key] = _val 4071 del _params['kwargs'] 4072 4073 _collection_formats = {} 4074 4075 # process the path parameters 4076 _path_params = {} 4077 4078 # process the query parameters 4079 _query_params = [] 4080 if _params.get('prefix') is not None: # noqa: E501 4081 _query_params.append(('prefix', _params['prefix'])) 4082 4083 if _params.get('after') is not None: # noqa: E501 4084 _query_params.append(('after', _params['after'])) 4085 4086 if _params.get('amount') is not None: # noqa: E501 4087 _query_params.append(('amount', _params['amount'])) 4088 4089 # process the header parameters 4090 _header_params = dict(_params.get('_headers', {})) 4091 # process the form parameters 4092 _form_params = [] 4093 _files = {} 4094 # process the body parameter 4095 _body_params = None 4096 # set the HTTP header `Accept` 4097 _header_params['Accept'] = self.api_client.select_header_accept( 4098 ['application/json']) # noqa: E501 4099 4100 # authentication setting 4101 _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501 4102 4103 _response_types_map = { 4104 '200': "PolicyList", 4105 '401': "Error", 4106 '420': None, 4107 } 4108 4109 return self.api_client.call_api( 4110 '/auth/policies', 'GET', 4111 _path_params, 4112 _query_params, 4113 _header_params, 4114 body=_body_params, 4115 post_params=_form_params, 4116 files=_files, 4117 response_types_map=_response_types_map, 4118 auth_settings=_auth_settings, 4119 async_req=_params.get('async_req'), 4120 _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 4121 _preload_content=_params.get('_preload_content', True), 4122 _request_timeout=_params.get('_request_timeout'), 4123 collection_formats=_collection_formats, 4124 _request_auth=_params.get('_request_auth')) 4125 4126 @validate_arguments 4127 def list_user_credentials(self, user_id : StrictStr, prefix : Annotated[Optional[StrictStr], Field(description="return items prefixed with this value")] = None, after : Annotated[Optional[StrictStr], Field(description="return items after this value")] = None, amount : Annotated[Optional[conint(strict=True, le=1000, ge=-1)], Field(description="how many items to return")] = None, **kwargs) -> CredentialsList: # noqa: E501 4128 """list user credentials # noqa: E501 4129 4130 This method makes a synchronous HTTP request by default. To make an 4131 asynchronous HTTP request, please pass async_req=True 4132 4133 >>> thread = api.list_user_credentials(user_id, prefix, after, amount, async_req=True) 4134 >>> result = thread.get() 4135 4136 :param user_id: (required) 4137 :type user_id: str 4138 :param prefix: return items prefixed with this value 4139 :type prefix: str 4140 :param after: return items after this value 4141 :type after: str 4142 :param amount: how many items to return 4143 :type amount: int 4144 :param async_req: Whether to execute the request asynchronously. 4145 :type async_req: bool, optional 4146 :param _request_timeout: timeout setting for this request. If one 4147 number provided, it will be total request 4148 timeout. It can also be a pair (tuple) of 4149 (connection, read) timeouts. 4150 :return: Returns the result object. 4151 If the method is called asynchronously, 4152 returns the request thread. 4153 :rtype: CredentialsList 4154 """ 4155 kwargs['_return_http_data_only'] = True 4156 if '_preload_content' in kwargs: 4157 raise ValueError("Error! Please call the list_user_credentials_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") 4158 return self.list_user_credentials_with_http_info(user_id, prefix, after, amount, **kwargs) # noqa: E501 4159 4160 @validate_arguments 4161 def list_user_credentials_with_http_info(self, user_id : StrictStr, prefix : Annotated[Optional[StrictStr], Field(description="return items prefixed with this value")] = None, after : Annotated[Optional[StrictStr], Field(description="return items after this value")] = None, amount : Annotated[Optional[conint(strict=True, le=1000, ge=-1)], Field(description="how many items to return")] = None, **kwargs) -> ApiResponse: # noqa: E501 4162 """list user credentials # noqa: E501 4163 4164 This method makes a synchronous HTTP request by default. To make an 4165 asynchronous HTTP request, please pass async_req=True 4166 4167 >>> thread = api.list_user_credentials_with_http_info(user_id, prefix, after, amount, async_req=True) 4168 >>> result = thread.get() 4169 4170 :param user_id: (required) 4171 :type user_id: str 4172 :param prefix: return items prefixed with this value 4173 :type prefix: str 4174 :param after: return items after this value 4175 :type after: str 4176 :param amount: how many items to return 4177 :type amount: int 4178 :param async_req: Whether to execute the request asynchronously. 4179 :type async_req: bool, optional 4180 :param _preload_content: if False, the ApiResponse.data will 4181 be set to none and raw_data will store the 4182 HTTP response body without reading/decoding. 4183 Default is True. 4184 :type _preload_content: bool, optional 4185 :param _return_http_data_only: response data instead of ApiResponse 4186 object with status code, headers, etc 4187 :type _return_http_data_only: bool, optional 4188 :param _request_timeout: timeout setting for this request. If one 4189 number provided, it will be total request 4190 timeout. It can also be a pair (tuple) of 4191 (connection, read) timeouts. 4192 :param _request_auth: set to override the auth_settings for an a single 4193 request; this effectively ignores the authentication 4194 in the spec for a single request. 4195 :type _request_auth: dict, optional 4196 :type _content_type: string, optional: force content-type for the request 4197 :return: Returns the result object. 4198 If the method is called asynchronously, 4199 returns the request thread. 4200 :rtype: tuple(CredentialsList, status_code(int), headers(HTTPHeaderDict)) 4201 """ 4202 4203 _params = locals() 4204 4205 _all_params = [ 4206 'user_id', 4207 'prefix', 4208 'after', 4209 'amount' 4210 ] 4211 _all_params.extend( 4212 [ 4213 'async_req', 4214 '_return_http_data_only', 4215 '_preload_content', 4216 '_request_timeout', 4217 '_request_auth', 4218 '_content_type', 4219 '_headers' 4220 ] 4221 ) 4222 4223 # validate the arguments 4224 for _key, _val in _params['kwargs'].items(): 4225 if _key not in _all_params: 4226 raise ApiTypeError( 4227 "Got an unexpected keyword argument '%s'" 4228 " to method list_user_credentials" % _key 4229 ) 4230 _params[_key] = _val 4231 del _params['kwargs'] 4232 4233 _collection_formats = {} 4234 4235 # process the path parameters 4236 _path_params = {} 4237 if _params['user_id']: 4238 _path_params['userId'] = _params['user_id'] 4239 4240 4241 # process the query parameters 4242 _query_params = [] 4243 if _params.get('prefix') is not None: # noqa: E501 4244 _query_params.append(('prefix', _params['prefix'])) 4245 4246 if _params.get('after') is not None: # noqa: E501 4247 _query_params.append(('after', _params['after'])) 4248 4249 if _params.get('amount') is not None: # noqa: E501 4250 _query_params.append(('amount', _params['amount'])) 4251 4252 # process the header parameters 4253 _header_params = dict(_params.get('_headers', {})) 4254 # process the form parameters 4255 _form_params = [] 4256 _files = {} 4257 # process the body parameter 4258 _body_params = None 4259 # set the HTTP header `Accept` 4260 _header_params['Accept'] = self.api_client.select_header_accept( 4261 ['application/json']) # noqa: E501 4262 4263 # authentication setting 4264 _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501 4265 4266 _response_types_map = { 4267 '200': "CredentialsList", 4268 '401': "Error", 4269 '404': "Error", 4270 '420': None, 4271 } 4272 4273 return self.api_client.call_api( 4274 '/auth/users/{userId}/credentials', 'GET', 4275 _path_params, 4276 _query_params, 4277 _header_params, 4278 body=_body_params, 4279 post_params=_form_params, 4280 files=_files, 4281 response_types_map=_response_types_map, 4282 auth_settings=_auth_settings, 4283 async_req=_params.get('async_req'), 4284 _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 4285 _preload_content=_params.get('_preload_content', True), 4286 _request_timeout=_params.get('_request_timeout'), 4287 collection_formats=_collection_formats, 4288 _request_auth=_params.get('_request_auth')) 4289 4290 @validate_arguments 4291 def list_user_external_principals(self, user_id : StrictStr, prefix : Annotated[Optional[StrictStr], Field(description="return items prefixed with this value")] = None, after : Annotated[Optional[StrictStr], Field(description="return items after this value")] = None, amount : Annotated[Optional[conint(strict=True, le=1000, ge=-1)], Field(description="how many items to return")] = None, **kwargs) -> ExternalPrincipalList: # noqa: E501 4292 """list user external policies attached to a user # noqa: E501 4293 4294 This method makes a synchronous HTTP request by default. To make an 4295 asynchronous HTTP request, please pass async_req=True 4296 4297 >>> thread = api.list_user_external_principals(user_id, prefix, after, amount, async_req=True) 4298 >>> result = thread.get() 4299 4300 :param user_id: (required) 4301 :type user_id: str 4302 :param prefix: return items prefixed with this value 4303 :type prefix: str 4304 :param after: return items after this value 4305 :type after: str 4306 :param amount: how many items to return 4307 :type amount: int 4308 :param async_req: Whether to execute the request asynchronously. 4309 :type async_req: bool, optional 4310 :param _request_timeout: timeout setting for this request. If one 4311 number provided, it will be total request 4312 timeout. It can also be a pair (tuple) of 4313 (connection, read) timeouts. 4314 :return: Returns the result object. 4315 If the method is called asynchronously, 4316 returns the request thread. 4317 :rtype: ExternalPrincipalList 4318 """ 4319 kwargs['_return_http_data_only'] = True 4320 if '_preload_content' in kwargs: 4321 raise ValueError("Error! Please call the list_user_external_principals_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") 4322 return self.list_user_external_principals_with_http_info(user_id, prefix, after, amount, **kwargs) # noqa: E501 4323 4324 @validate_arguments 4325 def list_user_external_principals_with_http_info(self, user_id : StrictStr, prefix : Annotated[Optional[StrictStr], Field(description="return items prefixed with this value")] = None, after : Annotated[Optional[StrictStr], Field(description="return items after this value")] = None, amount : Annotated[Optional[conint(strict=True, le=1000, ge=-1)], Field(description="how many items to return")] = None, **kwargs) -> ApiResponse: # noqa: E501 4326 """list user external policies attached to a user # 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 4331 >>> thread = api.list_user_external_principals_with_http_info(user_id, prefix, after, amount, async_req=True) 4332 >>> result = thread.get() 4333 4334 :param user_id: (required) 4335 :type user_id: str 4336 :param prefix: return items prefixed with this value 4337 :type prefix: str 4338 :param after: return items after this value 4339 :type after: str 4340 :param amount: how many items to return 4341 :type amount: int 4342 :param async_req: Whether to execute the request asynchronously. 4343 :type async_req: bool, optional 4344 :param _preload_content: if False, the ApiResponse.data will 4345 be set to none and raw_data will store the 4346 HTTP response body without reading/decoding. 4347 Default is True. 4348 :type _preload_content: bool, optional 4349 :param _return_http_data_only: response data instead of ApiResponse 4350 object with status code, headers, etc 4351 :type _return_http_data_only: bool, optional 4352 :param _request_timeout: timeout setting for this request. If one 4353 number provided, it will be total request 4354 timeout. It can also be a pair (tuple) of 4355 (connection, read) timeouts. 4356 :param _request_auth: set to override the auth_settings for an a single 4357 request; this effectively ignores the authentication 4358 in the spec for a single request. 4359 :type _request_auth: dict, optional 4360 :type _content_type: string, optional: force content-type for the request 4361 :return: Returns the result object. 4362 If the method is called asynchronously, 4363 returns the request thread. 4364 :rtype: tuple(ExternalPrincipalList, status_code(int), headers(HTTPHeaderDict)) 4365 """ 4366 4367 _params = locals() 4368 4369 _all_params = [ 4370 'user_id', 4371 'prefix', 4372 'after', 4373 'amount' 4374 ] 4375 _all_params.extend( 4376 [ 4377 'async_req', 4378 '_return_http_data_only', 4379 '_preload_content', 4380 '_request_timeout', 4381 '_request_auth', 4382 '_content_type', 4383 '_headers' 4384 ] 4385 ) 4386 4387 # validate the arguments 4388 for _key, _val in _params['kwargs'].items(): 4389 if _key not in _all_params: 4390 raise ApiTypeError( 4391 "Got an unexpected keyword argument '%s'" 4392 " to method list_user_external_principals" % _key 4393 ) 4394 _params[_key] = _val 4395 del _params['kwargs'] 4396 4397 _collection_formats = {} 4398 4399 # process the path parameters 4400 _path_params = {} 4401 if _params['user_id']: 4402 _path_params['userId'] = _params['user_id'] 4403 4404 4405 # process the query parameters 4406 _query_params = [] 4407 if _params.get('prefix') is not None: # noqa: E501 4408 _query_params.append(('prefix', _params['prefix'])) 4409 4410 if _params.get('after') is not None: # noqa: E501 4411 _query_params.append(('after', _params['after'])) 4412 4413 if _params.get('amount') is not None: # noqa: E501 4414 _query_params.append(('amount', _params['amount'])) 4415 4416 # process the header parameters 4417 _header_params = dict(_params.get('_headers', {})) 4418 # process the form parameters 4419 _form_params = [] 4420 _files = {} 4421 # process the body parameter 4422 _body_params = None 4423 # set the HTTP header `Accept` 4424 _header_params['Accept'] = self.api_client.select_header_accept( 4425 ['application/json']) # noqa: E501 4426 4427 # authentication setting 4428 _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501 4429 4430 _response_types_map = { 4431 '200': "ExternalPrincipalList", 4432 '401': "Error", 4433 '404': "Error", 4434 '420': None, 4435 } 4436 4437 return self.api_client.call_api( 4438 '/auth/users/{userId}/external/principals/ls', 'GET', 4439 _path_params, 4440 _query_params, 4441 _header_params, 4442 body=_body_params, 4443 post_params=_form_params, 4444 files=_files, 4445 response_types_map=_response_types_map, 4446 auth_settings=_auth_settings, 4447 async_req=_params.get('async_req'), 4448 _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 4449 _preload_content=_params.get('_preload_content', True), 4450 _request_timeout=_params.get('_request_timeout'), 4451 collection_formats=_collection_formats, 4452 _request_auth=_params.get('_request_auth')) 4453 4454 @validate_arguments 4455 def list_user_groups(self, user_id : StrictStr, prefix : Annotated[Optional[StrictStr], Field(description="return items prefixed with this value")] = None, after : Annotated[Optional[StrictStr], Field(description="return items after this value")] = None, amount : Annotated[Optional[conint(strict=True, le=1000, ge=-1)], Field(description="how many items to return")] = None, **kwargs) -> GroupList: # noqa: E501 4456 """list user groups # noqa: E501 4457 4458 This method makes a synchronous HTTP request by default. To make an 4459 asynchronous HTTP request, please pass async_req=True 4460 4461 >>> thread = api.list_user_groups(user_id, prefix, after, amount, async_req=True) 4462 >>> result = thread.get() 4463 4464 :param user_id: (required) 4465 :type user_id: str 4466 :param prefix: return items prefixed with this value 4467 :type prefix: str 4468 :param after: return items after this value 4469 :type after: str 4470 :param amount: how many items to return 4471 :type amount: int 4472 :param async_req: Whether to execute the request asynchronously. 4473 :type async_req: bool, optional 4474 :param _request_timeout: timeout setting for this request. If one 4475 number provided, it will be total request 4476 timeout. It can also be a pair (tuple) of 4477 (connection, read) timeouts. 4478 :return: Returns the result object. 4479 If the method is called asynchronously, 4480 returns the request thread. 4481 :rtype: GroupList 4482 """ 4483 kwargs['_return_http_data_only'] = True 4484 if '_preload_content' in kwargs: 4485 raise ValueError("Error! Please call the list_user_groups_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") 4486 return self.list_user_groups_with_http_info(user_id, prefix, after, amount, **kwargs) # noqa: E501 4487 4488 @validate_arguments 4489 def list_user_groups_with_http_info(self, user_id : StrictStr, prefix : Annotated[Optional[StrictStr], Field(description="return items prefixed with this value")] = None, after : Annotated[Optional[StrictStr], Field(description="return items after this value")] = None, amount : Annotated[Optional[conint(strict=True, le=1000, ge=-1)], Field(description="how many items to return")] = None, **kwargs) -> ApiResponse: # noqa: E501 4490 """list user groups # noqa: E501 4491 4492 This method makes a synchronous HTTP request by default. To make an 4493 asynchronous HTTP request, please pass async_req=True 4494 4495 >>> thread = api.list_user_groups_with_http_info(user_id, prefix, after, amount, async_req=True) 4496 >>> result = thread.get() 4497 4498 :param user_id: (required) 4499 :type user_id: str 4500 :param prefix: return items prefixed with this value 4501 :type prefix: str 4502 :param after: return items after this value 4503 :type after: str 4504 :param amount: how many items to return 4505 :type amount: int 4506 :param async_req: Whether to execute the request asynchronously. 4507 :type async_req: bool, optional 4508 :param _preload_content: if False, the ApiResponse.data will 4509 be set to none and raw_data will store the 4510 HTTP response body without reading/decoding. 4511 Default is True. 4512 :type _preload_content: bool, optional 4513 :param _return_http_data_only: response data instead of ApiResponse 4514 object with status code, headers, etc 4515 :type _return_http_data_only: bool, optional 4516 :param _request_timeout: timeout setting for this request. If one 4517 number provided, it will be total request 4518 timeout. It can also be a pair (tuple) of 4519 (connection, read) timeouts. 4520 :param _request_auth: set to override the auth_settings for an a single 4521 request; this effectively ignores the authentication 4522 in the spec for a single request. 4523 :type _request_auth: dict, optional 4524 :type _content_type: string, optional: force content-type for the request 4525 :return: Returns the result object. 4526 If the method is called asynchronously, 4527 returns the request thread. 4528 :rtype: tuple(GroupList, status_code(int), headers(HTTPHeaderDict)) 4529 """ 4530 4531 _params = locals() 4532 4533 _all_params = [ 4534 'user_id', 4535 'prefix', 4536 'after', 4537 'amount' 4538 ] 4539 _all_params.extend( 4540 [ 4541 'async_req', 4542 '_return_http_data_only', 4543 '_preload_content', 4544 '_request_timeout', 4545 '_request_auth', 4546 '_content_type', 4547 '_headers' 4548 ] 4549 ) 4550 4551 # validate the arguments 4552 for _key, _val in _params['kwargs'].items(): 4553 if _key not in _all_params: 4554 raise ApiTypeError( 4555 "Got an unexpected keyword argument '%s'" 4556 " to method list_user_groups" % _key 4557 ) 4558 _params[_key] = _val 4559 del _params['kwargs'] 4560 4561 _collection_formats = {} 4562 4563 # process the path parameters 4564 _path_params = {} 4565 if _params['user_id']: 4566 _path_params['userId'] = _params['user_id'] 4567 4568 4569 # process the query parameters 4570 _query_params = [] 4571 if _params.get('prefix') is not None: # noqa: E501 4572 _query_params.append(('prefix', _params['prefix'])) 4573 4574 if _params.get('after') is not None: # noqa: E501 4575 _query_params.append(('after', _params['after'])) 4576 4577 if _params.get('amount') is not None: # noqa: E501 4578 _query_params.append(('amount', _params['amount'])) 4579 4580 # process the header parameters 4581 _header_params = dict(_params.get('_headers', {})) 4582 # process the form parameters 4583 _form_params = [] 4584 _files = {} 4585 # process the body parameter 4586 _body_params = None 4587 # set the HTTP header `Accept` 4588 _header_params['Accept'] = self.api_client.select_header_accept( 4589 ['application/json']) # noqa: E501 4590 4591 # authentication setting 4592 _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501 4593 4594 _response_types_map = { 4595 '200': "GroupList", 4596 '401': "Error", 4597 '404': "Error", 4598 '420': None, 4599 } 4600 4601 return self.api_client.call_api( 4602 '/auth/users/{userId}/groups', 'GET', 4603 _path_params, 4604 _query_params, 4605 _header_params, 4606 body=_body_params, 4607 post_params=_form_params, 4608 files=_files, 4609 response_types_map=_response_types_map, 4610 auth_settings=_auth_settings, 4611 async_req=_params.get('async_req'), 4612 _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 4613 _preload_content=_params.get('_preload_content', True), 4614 _request_timeout=_params.get('_request_timeout'), 4615 collection_formats=_collection_formats, 4616 _request_auth=_params.get('_request_auth')) 4617 4618 @validate_arguments 4619 def list_user_policies(self, user_id : StrictStr, prefix : Annotated[Optional[StrictStr], Field(description="return items prefixed with this value")] = None, after : Annotated[Optional[StrictStr], Field(description="return items after this value")] = None, amount : Annotated[Optional[conint(strict=True, le=1000, ge=-1)], Field(description="how many items to return")] = None, effective : Annotated[Optional[StrictBool], Field(description="will return all distinct policies attached to the user or any of its groups")] = None, **kwargs) -> PolicyList: # noqa: E501 4620 """list user policies # noqa: E501 4621 4622 This method makes a synchronous HTTP request by default. To make an 4623 asynchronous HTTP request, please pass async_req=True 4624 4625 >>> thread = api.list_user_policies(user_id, prefix, after, amount, effective, async_req=True) 4626 >>> result = thread.get() 4627 4628 :param user_id: (required) 4629 :type user_id: str 4630 :param prefix: return items prefixed with this value 4631 :type prefix: str 4632 :param after: return items after this value 4633 :type after: str 4634 :param amount: how many items to return 4635 :type amount: int 4636 :param effective: will return all distinct policies attached to the user or any of its groups 4637 :type effective: bool 4638 :param async_req: Whether to execute the request asynchronously. 4639 :type async_req: bool, optional 4640 :param _request_timeout: timeout setting for this request. If one 4641 number provided, it will be total request 4642 timeout. It can also be a pair (tuple) of 4643 (connection, read) timeouts. 4644 :return: Returns the result object. 4645 If the method is called asynchronously, 4646 returns the request thread. 4647 :rtype: PolicyList 4648 """ 4649 kwargs['_return_http_data_only'] = True 4650 if '_preload_content' in kwargs: 4651 raise ValueError("Error! Please call the list_user_policies_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") 4652 return self.list_user_policies_with_http_info(user_id, prefix, after, amount, effective, **kwargs) # noqa: E501 4653 4654 @validate_arguments 4655 def list_user_policies_with_http_info(self, user_id : StrictStr, prefix : Annotated[Optional[StrictStr], Field(description="return items prefixed with this value")] = None, after : Annotated[Optional[StrictStr], Field(description="return items after this value")] = None, amount : Annotated[Optional[conint(strict=True, le=1000, ge=-1)], Field(description="how many items to return")] = None, effective : Annotated[Optional[StrictBool], Field(description="will return all distinct policies attached to the user or any of its groups")] = None, **kwargs) -> ApiResponse: # noqa: E501 4656 """list user policies # noqa: E501 4657 4658 This method makes a synchronous HTTP request by default. To make an 4659 asynchronous HTTP request, please pass async_req=True 4660 4661 >>> thread = api.list_user_policies_with_http_info(user_id, prefix, after, amount, effective, async_req=True) 4662 >>> result = thread.get() 4663 4664 :param user_id: (required) 4665 :type user_id: str 4666 :param prefix: return items prefixed with this value 4667 :type prefix: str 4668 :param after: return items after this value 4669 :type after: str 4670 :param amount: how many items to return 4671 :type amount: int 4672 :param effective: will return all distinct policies attached to the user or any of its groups 4673 :type effective: bool 4674 :param async_req: Whether to execute the request asynchronously. 4675 :type async_req: bool, optional 4676 :param _preload_content: if False, the ApiResponse.data will 4677 be set to none and raw_data will store the 4678 HTTP response body without reading/decoding. 4679 Default is True. 4680 :type _preload_content: bool, optional 4681 :param _return_http_data_only: response data instead of ApiResponse 4682 object with status code, headers, etc 4683 :type _return_http_data_only: bool, optional 4684 :param _request_timeout: timeout setting for this request. If one 4685 number provided, it will be total request 4686 timeout. It can also be a pair (tuple) of 4687 (connection, read) timeouts. 4688 :param _request_auth: set to override the auth_settings for an a single 4689 request; this effectively ignores the authentication 4690 in the spec for a single request. 4691 :type _request_auth: dict, optional 4692 :type _content_type: string, optional: force content-type for the request 4693 :return: Returns the result object. 4694 If the method is called asynchronously, 4695 returns the request thread. 4696 :rtype: tuple(PolicyList, status_code(int), headers(HTTPHeaderDict)) 4697 """ 4698 4699 _params = locals() 4700 4701 _all_params = [ 4702 'user_id', 4703 'prefix', 4704 'after', 4705 'amount', 4706 'effective' 4707 ] 4708 _all_params.extend( 4709 [ 4710 'async_req', 4711 '_return_http_data_only', 4712 '_preload_content', 4713 '_request_timeout', 4714 '_request_auth', 4715 '_content_type', 4716 '_headers' 4717 ] 4718 ) 4719 4720 # validate the arguments 4721 for _key, _val in _params['kwargs'].items(): 4722 if _key not in _all_params: 4723 raise ApiTypeError( 4724 "Got an unexpected keyword argument '%s'" 4725 " to method list_user_policies" % _key 4726 ) 4727 _params[_key] = _val 4728 del _params['kwargs'] 4729 4730 _collection_formats = {} 4731 4732 # process the path parameters 4733 _path_params = {} 4734 if _params['user_id']: 4735 _path_params['userId'] = _params['user_id'] 4736 4737 4738 # process the query parameters 4739 _query_params = [] 4740 if _params.get('prefix') is not None: # noqa: E501 4741 _query_params.append(('prefix', _params['prefix'])) 4742 4743 if _params.get('after') is not None: # noqa: E501 4744 _query_params.append(('after', _params['after'])) 4745 4746 if _params.get('amount') is not None: # noqa: E501 4747 _query_params.append(('amount', _params['amount'])) 4748 4749 if _params.get('effective') is not None: # noqa: E501 4750 _query_params.append(('effective', _params['effective'])) 4751 4752 # process the header parameters 4753 _header_params = dict(_params.get('_headers', {})) 4754 # process the form parameters 4755 _form_params = [] 4756 _files = {} 4757 # process the body parameter 4758 _body_params = None 4759 # set the HTTP header `Accept` 4760 _header_params['Accept'] = self.api_client.select_header_accept( 4761 ['application/json']) # noqa: E501 4762 4763 # authentication setting 4764 _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501 4765 4766 _response_types_map = { 4767 '200': "PolicyList", 4768 '401': "Error", 4769 '404': "Error", 4770 '420': None, 4771 } 4772 4773 return self.api_client.call_api( 4774 '/auth/users/{userId}/policies', 'GET', 4775 _path_params, 4776 _query_params, 4777 _header_params, 4778 body=_body_params, 4779 post_params=_form_params, 4780 files=_files, 4781 response_types_map=_response_types_map, 4782 auth_settings=_auth_settings, 4783 async_req=_params.get('async_req'), 4784 _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 4785 _preload_content=_params.get('_preload_content', True), 4786 _request_timeout=_params.get('_request_timeout'), 4787 collection_formats=_collection_formats, 4788 _request_auth=_params.get('_request_auth')) 4789 4790 @validate_arguments 4791 def list_users(self, prefix : Annotated[Optional[StrictStr], Field(description="return items prefixed with this value")] = None, after : Annotated[Optional[StrictStr], Field(description="return items after this value")] = None, amount : Annotated[Optional[conint(strict=True, le=1000, ge=-1)], Field(description="how many items to return")] = None, **kwargs) -> UserList: # noqa: E501 4792 """list users # noqa: E501 4793 4794 This method makes a synchronous HTTP request by default. To make an 4795 asynchronous HTTP request, please pass async_req=True 4796 4797 >>> thread = api.list_users(prefix, after, amount, async_req=True) 4798 >>> result = thread.get() 4799 4800 :param prefix: return items prefixed with this value 4801 :type prefix: str 4802 :param after: return items after this value 4803 :type after: str 4804 :param amount: how many items to return 4805 :type amount: int 4806 :param async_req: Whether to execute the request asynchronously. 4807 :type async_req: bool, optional 4808 :param _request_timeout: timeout setting for this request. If one 4809 number provided, it will be total request 4810 timeout. It can also be a pair (tuple) of 4811 (connection, read) timeouts. 4812 :return: Returns the result object. 4813 If the method is called asynchronously, 4814 returns the request thread. 4815 :rtype: UserList 4816 """ 4817 kwargs['_return_http_data_only'] = True 4818 if '_preload_content' in kwargs: 4819 raise ValueError("Error! Please call the list_users_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") 4820 return self.list_users_with_http_info(prefix, after, amount, **kwargs) # noqa: E501 4821 4822 @validate_arguments 4823 def list_users_with_http_info(self, prefix : Annotated[Optional[StrictStr], Field(description="return items prefixed with this value")] = None, after : Annotated[Optional[StrictStr], Field(description="return items after this value")] = None, amount : Annotated[Optional[conint(strict=True, le=1000, ge=-1)], Field(description="how many items to return")] = None, **kwargs) -> ApiResponse: # noqa: E501 4824 """list users # noqa: E501 4825 4826 This method makes a synchronous HTTP request by default. To make an 4827 asynchronous HTTP request, please pass async_req=True 4828 4829 >>> thread = api.list_users_with_http_info(prefix, after, amount, async_req=True) 4830 >>> result = thread.get() 4831 4832 :param prefix: return items prefixed with this value 4833 :type prefix: str 4834 :param after: return items after this value 4835 :type after: str 4836 :param amount: how many items to return 4837 :type amount: int 4838 :param async_req: Whether to execute the request asynchronously. 4839 :type async_req: bool, optional 4840 :param _preload_content: if False, the ApiResponse.data will 4841 be set to none and raw_data will store the 4842 HTTP response body without reading/decoding. 4843 Default is True. 4844 :type _preload_content: bool, optional 4845 :param _return_http_data_only: response data instead of ApiResponse 4846 object with status code, headers, etc 4847 :type _return_http_data_only: bool, optional 4848 :param _request_timeout: timeout setting for this request. If one 4849 number provided, it will be total request 4850 timeout. It can also be a pair (tuple) of 4851 (connection, read) timeouts. 4852 :param _request_auth: set to override the auth_settings for an a single 4853 request; this effectively ignores the authentication 4854 in the spec for a single request. 4855 :type _request_auth: dict, optional 4856 :type _content_type: string, optional: force content-type for the request 4857 :return: Returns the result object. 4858 If the method is called asynchronously, 4859 returns the request thread. 4860 :rtype: tuple(UserList, status_code(int), headers(HTTPHeaderDict)) 4861 """ 4862 4863 _params = locals() 4864 4865 _all_params = [ 4866 'prefix', 4867 'after', 4868 'amount' 4869 ] 4870 _all_params.extend( 4871 [ 4872 'async_req', 4873 '_return_http_data_only', 4874 '_preload_content', 4875 '_request_timeout', 4876 '_request_auth', 4877 '_content_type', 4878 '_headers' 4879 ] 4880 ) 4881 4882 # validate the arguments 4883 for _key, _val in _params['kwargs'].items(): 4884 if _key not in _all_params: 4885 raise ApiTypeError( 4886 "Got an unexpected keyword argument '%s'" 4887 " to method list_users" % _key 4888 ) 4889 _params[_key] = _val 4890 del _params['kwargs'] 4891 4892 _collection_formats = {} 4893 4894 # process the path parameters 4895 _path_params = {} 4896 4897 # process the query parameters 4898 _query_params = [] 4899 if _params.get('prefix') is not None: # noqa: E501 4900 _query_params.append(('prefix', _params['prefix'])) 4901 4902 if _params.get('after') is not None: # noqa: E501 4903 _query_params.append(('after', _params['after'])) 4904 4905 if _params.get('amount') is not None: # noqa: E501 4906 _query_params.append(('amount', _params['amount'])) 4907 4908 # process the header parameters 4909 _header_params = dict(_params.get('_headers', {})) 4910 # process the form parameters 4911 _form_params = [] 4912 _files = {} 4913 # process the body parameter 4914 _body_params = None 4915 # set the HTTP header `Accept` 4916 _header_params['Accept'] = self.api_client.select_header_accept( 4917 ['application/json']) # noqa: E501 4918 4919 # authentication setting 4920 _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501 4921 4922 _response_types_map = { 4923 '200': "UserList", 4924 '401': "Error", 4925 '420': None, 4926 } 4927 4928 return self.api_client.call_api( 4929 '/auth/users', 'GET', 4930 _path_params, 4931 _query_params, 4932 _header_params, 4933 body=_body_params, 4934 post_params=_form_params, 4935 files=_files, 4936 response_types_map=_response_types_map, 4937 auth_settings=_auth_settings, 4938 async_req=_params.get('async_req'), 4939 _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 4940 _preload_content=_params.get('_preload_content', True), 4941 _request_timeout=_params.get('_request_timeout'), 4942 collection_formats=_collection_formats, 4943 _request_auth=_params.get('_request_auth')) 4944 4945 @validate_arguments 4946 def login(self, login_information : Optional[LoginInformation] = None, **kwargs) -> AuthenticationToken: # noqa: E501 4947 """perform a login # noqa: E501 4948 4949 This method makes a synchronous HTTP request by default. To make an 4950 asynchronous HTTP request, please pass async_req=True 4951 4952 >>> thread = api.login(login_information, async_req=True) 4953 >>> result = thread.get() 4954 4955 :param login_information: 4956 :type login_information: LoginInformation 4957 :param async_req: Whether to execute the request asynchronously. 4958 :type async_req: bool, optional 4959 :param _request_timeout: timeout setting for this request. If one 4960 number provided, it will be total request 4961 timeout. It can also be a pair (tuple) of 4962 (connection, read) timeouts. 4963 :return: Returns the result object. 4964 If the method is called asynchronously, 4965 returns the request thread. 4966 :rtype: AuthenticationToken 4967 """ 4968 kwargs['_return_http_data_only'] = True 4969 if '_preload_content' in kwargs: 4970 raise ValueError("Error! Please call the login_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") 4971 return self.login_with_http_info(login_information, **kwargs) # noqa: E501 4972 4973 @validate_arguments 4974 def login_with_http_info(self, login_information : Optional[LoginInformation] = None, **kwargs) -> ApiResponse: # noqa: E501 4975 """perform a login # noqa: E501 4976 4977 This method makes a synchronous HTTP request by default. To make an 4978 asynchronous HTTP request, please pass async_req=True 4979 4980 >>> thread = api.login_with_http_info(login_information, async_req=True) 4981 >>> result = thread.get() 4982 4983 :param login_information: 4984 :type login_information: LoginInformation 4985 :param async_req: Whether to execute the request asynchronously. 4986 :type async_req: bool, optional 4987 :param _preload_content: if False, the ApiResponse.data will 4988 be set to none and raw_data will store the 4989 HTTP response body without reading/decoding. 4990 Default is True. 4991 :type _preload_content: bool, optional 4992 :param _return_http_data_only: response data instead of ApiResponse 4993 object with status code, headers, etc 4994 :type _return_http_data_only: bool, optional 4995 :param _request_timeout: timeout setting for this request. If one 4996 number provided, it will be total request 4997 timeout. It can also be a pair (tuple) of 4998 (connection, read) timeouts. 4999 :param _request_auth: set to override the auth_settings for an a single 5000 request; this effectively ignores the authentication 5001 in the spec for a single request. 5002 :type _request_auth: dict, optional 5003 :type _content_type: string, optional: force content-type for the request 5004 :return: Returns the result object. 5005 If the method is called asynchronously, 5006 returns the request thread. 5007 :rtype: tuple(AuthenticationToken, status_code(int), headers(HTTPHeaderDict)) 5008 """ 5009 5010 _params = locals() 5011 5012 _all_params = [ 5013 'login_information' 5014 ] 5015 _all_params.extend( 5016 [ 5017 'async_req', 5018 '_return_http_data_only', 5019 '_preload_content', 5020 '_request_timeout', 5021 '_request_auth', 5022 '_content_type', 5023 '_headers' 5024 ] 5025 ) 5026 5027 # validate the arguments 5028 for _key, _val in _params['kwargs'].items(): 5029 if _key not in _all_params: 5030 raise ApiTypeError( 5031 "Got an unexpected keyword argument '%s'" 5032 " to method login" % _key 5033 ) 5034 _params[_key] = _val 5035 del _params['kwargs'] 5036 5037 _collection_formats = {} 5038 5039 # process the path parameters 5040 _path_params = {} 5041 5042 # process the query parameters 5043 _query_params = [] 5044 # process the header parameters 5045 _header_params = dict(_params.get('_headers', {})) 5046 # process the form parameters 5047 _form_params = [] 5048 _files = {} 5049 # process the body parameter 5050 _body_params = None 5051 if _params['login_information'] is not None: 5052 _body_params = _params['login_information'] 5053 5054 # set the HTTP header `Accept` 5055 _header_params['Accept'] = self.api_client.select_header_accept( 5056 ['application/json']) # noqa: E501 5057 5058 # set the HTTP header `Content-Type` 5059 _content_types_list = _params.get('_content_type', 5060 self.api_client.select_header_content_type( 5061 ['application/json'])) 5062 if _content_types_list: 5063 _header_params['Content-Type'] = _content_types_list 5064 5065 # authentication setting 5066 _auth_settings = [] # noqa: E501 5067 5068 _response_types_map = { 5069 '200': "AuthenticationToken", 5070 '401': "Error", 5071 '420': None, 5072 } 5073 5074 return self.api_client.call_api( 5075 '/auth/login', 'POST', 5076 _path_params, 5077 _query_params, 5078 _header_params, 5079 body=_body_params, 5080 post_params=_form_params, 5081 files=_files, 5082 response_types_map=_response_types_map, 5083 auth_settings=_auth_settings, 5084 async_req=_params.get('async_req'), 5085 _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 5086 _preload_content=_params.get('_preload_content', True), 5087 _request_timeout=_params.get('_request_timeout'), 5088 collection_formats=_collection_formats, 5089 _request_auth=_params.get('_request_auth')) 5090 5091 @validate_arguments 5092 def set_group_acl(self, group_id : StrictStr, acl : ACL, **kwargs) -> None: # noqa: E501 5093 """set ACL of group # noqa: E501 5094 5095 This method makes a synchronous HTTP request by default. To make an 5096 asynchronous HTTP request, please pass async_req=True 5097 5098 >>> thread = api.set_group_acl(group_id, acl, async_req=True) 5099 >>> result = thread.get() 5100 5101 :param group_id: (required) 5102 :type group_id: str 5103 :param acl: (required) 5104 :type acl: ACL 5105 :param async_req: Whether to execute the request asynchronously. 5106 :type async_req: bool, optional 5107 :param _request_timeout: timeout setting for this request. If one 5108 number provided, it will be total request 5109 timeout. It can also be a pair (tuple) of 5110 (connection, read) timeouts. 5111 :return: Returns the result object. 5112 If the method is called asynchronously, 5113 returns the request thread. 5114 :rtype: None 5115 """ 5116 kwargs['_return_http_data_only'] = True 5117 if '_preload_content' in kwargs: 5118 raise ValueError("Error! Please call the set_group_acl_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") 5119 return self.set_group_acl_with_http_info(group_id, acl, **kwargs) # noqa: E501 5120 5121 @validate_arguments 5122 def set_group_acl_with_http_info(self, group_id : StrictStr, acl : ACL, **kwargs) -> ApiResponse: # noqa: E501 5123 """set ACL of group # noqa: E501 5124 5125 This method makes a synchronous HTTP request by default. To make an 5126 asynchronous HTTP request, please pass async_req=True 5127 5128 >>> thread = api.set_group_acl_with_http_info(group_id, acl, async_req=True) 5129 >>> result = thread.get() 5130 5131 :param group_id: (required) 5132 :type group_id: str 5133 :param acl: (required) 5134 :type acl: ACL 5135 :param async_req: Whether to execute the request asynchronously. 5136 :type async_req: bool, optional 5137 :param _preload_content: if False, the ApiResponse.data will 5138 be set to none and raw_data will store the 5139 HTTP response body without reading/decoding. 5140 Default is True. 5141 :type _preload_content: bool, optional 5142 :param _return_http_data_only: response data instead of ApiResponse 5143 object with status code, headers, etc 5144 :type _return_http_data_only: bool, optional 5145 :param _request_timeout: timeout setting for this request. If one 5146 number provided, it will be total request 5147 timeout. It can also be a pair (tuple) of 5148 (connection, read) timeouts. 5149 :param _request_auth: set to override the auth_settings for an a single 5150 request; this effectively ignores the authentication 5151 in the spec for a single request. 5152 :type _request_auth: dict, optional 5153 :type _content_type: string, optional: force content-type for the request 5154 :return: Returns the result object. 5155 If the method is called asynchronously, 5156 returns the request thread. 5157 :rtype: None 5158 """ 5159 5160 _params = locals() 5161 5162 _all_params = [ 5163 'group_id', 5164 'acl' 5165 ] 5166 _all_params.extend( 5167 [ 5168 'async_req', 5169 '_return_http_data_only', 5170 '_preload_content', 5171 '_request_timeout', 5172 '_request_auth', 5173 '_content_type', 5174 '_headers' 5175 ] 5176 ) 5177 5178 # validate the arguments 5179 for _key, _val in _params['kwargs'].items(): 5180 if _key not in _all_params: 5181 raise ApiTypeError( 5182 "Got an unexpected keyword argument '%s'" 5183 " to method set_group_acl" % _key 5184 ) 5185 _params[_key] = _val 5186 del _params['kwargs'] 5187 5188 _collection_formats = {} 5189 5190 # process the path parameters 5191 _path_params = {} 5192 if _params['group_id']: 5193 _path_params['groupId'] = _params['group_id'] 5194 5195 5196 # process the query parameters 5197 _query_params = [] 5198 # process the header parameters 5199 _header_params = dict(_params.get('_headers', {})) 5200 # process the form parameters 5201 _form_params = [] 5202 _files = {} 5203 # process the body parameter 5204 _body_params = None 5205 if _params['acl'] is not None: 5206 _body_params = _params['acl'] 5207 5208 # set the HTTP header `Accept` 5209 _header_params['Accept'] = self.api_client.select_header_accept( 5210 ['application/json']) # noqa: E501 5211 5212 # set the HTTP header `Content-Type` 5213 _content_types_list = _params.get('_content_type', 5214 self.api_client.select_header_content_type( 5215 ['application/json'])) 5216 if _content_types_list: 5217 _header_params['Content-Type'] = _content_types_list 5218 5219 # authentication setting 5220 _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501 5221 5222 _response_types_map = {} 5223 5224 return self.api_client.call_api( 5225 '/auth/groups/{groupId}/acl', 'POST', 5226 _path_params, 5227 _query_params, 5228 _header_params, 5229 body=_body_params, 5230 post_params=_form_params, 5231 files=_files, 5232 response_types_map=_response_types_map, 5233 auth_settings=_auth_settings, 5234 async_req=_params.get('async_req'), 5235 _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 5236 _preload_content=_params.get('_preload_content', True), 5237 _request_timeout=_params.get('_request_timeout'), 5238 collection_formats=_collection_formats, 5239 _request_auth=_params.get('_request_auth')) 5240 5241 @validate_arguments 5242 def update_policy(self, policy_id : StrictStr, policy : Policy, **kwargs) -> Policy: # noqa: E501 5243 """update policy # noqa: E501 5244 5245 This method makes a synchronous HTTP request by default. To make an 5246 asynchronous HTTP request, please pass async_req=True 5247 5248 >>> thread = api.update_policy(policy_id, policy, async_req=True) 5249 >>> result = thread.get() 5250 5251 :param policy_id: (required) 5252 :type policy_id: str 5253 :param policy: (required) 5254 :type policy: Policy 5255 :param async_req: Whether to execute the request asynchronously. 5256 :type async_req: bool, optional 5257 :param _request_timeout: timeout setting for this request. If one 5258 number provided, it will be total request 5259 timeout. It can also be a pair (tuple) of 5260 (connection, read) timeouts. 5261 :return: Returns the result object. 5262 If the method is called asynchronously, 5263 returns the request thread. 5264 :rtype: Policy 5265 """ 5266 kwargs['_return_http_data_only'] = True 5267 if '_preload_content' in kwargs: 5268 raise ValueError("Error! Please call the update_policy_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") 5269 return self.update_policy_with_http_info(policy_id, policy, **kwargs) # noqa: E501 5270 5271 @validate_arguments 5272 def update_policy_with_http_info(self, policy_id : StrictStr, policy : Policy, **kwargs) -> ApiResponse: # noqa: E501 5273 """update policy # noqa: E501 5274 5275 This method makes a synchronous HTTP request by default. To make an 5276 asynchronous HTTP request, please pass async_req=True 5277 5278 >>> thread = api.update_policy_with_http_info(policy_id, policy, async_req=True) 5279 >>> result = thread.get() 5280 5281 :param policy_id: (required) 5282 :type policy_id: str 5283 :param policy: (required) 5284 :type policy: Policy 5285 :param async_req: Whether to execute the request asynchronously. 5286 :type async_req: bool, optional 5287 :param _preload_content: if False, the ApiResponse.data will 5288 be set to none and raw_data will store the 5289 HTTP response body without reading/decoding. 5290 Default is True. 5291 :type _preload_content: bool, optional 5292 :param _return_http_data_only: response data instead of ApiResponse 5293 object with status code, headers, etc 5294 :type _return_http_data_only: bool, optional 5295 :param _request_timeout: timeout setting for this request. If one 5296 number provided, it will be total request 5297 timeout. It can also be a pair (tuple) of 5298 (connection, read) timeouts. 5299 :param _request_auth: set to override the auth_settings for an a single 5300 request; this effectively ignores the authentication 5301 in the spec for a single request. 5302 :type _request_auth: dict, optional 5303 :type _content_type: string, optional: force content-type for the request 5304 :return: Returns the result object. 5305 If the method is called asynchronously, 5306 returns the request thread. 5307 :rtype: tuple(Policy, status_code(int), headers(HTTPHeaderDict)) 5308 """ 5309 5310 _params = locals() 5311 5312 _all_params = [ 5313 'policy_id', 5314 'policy' 5315 ] 5316 _all_params.extend( 5317 [ 5318 'async_req', 5319 '_return_http_data_only', 5320 '_preload_content', 5321 '_request_timeout', 5322 '_request_auth', 5323 '_content_type', 5324 '_headers' 5325 ] 5326 ) 5327 5328 # validate the arguments 5329 for _key, _val in _params['kwargs'].items(): 5330 if _key not in _all_params: 5331 raise ApiTypeError( 5332 "Got an unexpected keyword argument '%s'" 5333 " to method update_policy" % _key 5334 ) 5335 _params[_key] = _val 5336 del _params['kwargs'] 5337 5338 _collection_formats = {} 5339 5340 # process the path parameters 5341 _path_params = {} 5342 if _params['policy_id']: 5343 _path_params['policyId'] = _params['policy_id'] 5344 5345 5346 # process the query parameters 5347 _query_params = [] 5348 # process the header parameters 5349 _header_params = dict(_params.get('_headers', {})) 5350 # process the form parameters 5351 _form_params = [] 5352 _files = {} 5353 # process the body parameter 5354 _body_params = None 5355 if _params['policy'] is not None: 5356 _body_params = _params['policy'] 5357 5358 # set the HTTP header `Accept` 5359 _header_params['Accept'] = self.api_client.select_header_accept( 5360 ['application/json']) # noqa: E501 5361 5362 # set the HTTP header `Content-Type` 5363 _content_types_list = _params.get('_content_type', 5364 self.api_client.select_header_content_type( 5365 ['application/json'])) 5366 if _content_types_list: 5367 _header_params['Content-Type'] = _content_types_list 5368 5369 # authentication setting 5370 _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501 5371 5372 _response_types_map = { 5373 '200': "Policy", 5374 '400': "Error", 5375 '401': "Error", 5376 '404': "Error", 5377 '420': None, 5378 } 5379 5380 return self.api_client.call_api( 5381 '/auth/policies/{policyId}', 'PUT', 5382 _path_params, 5383 _query_params, 5384 _header_params, 5385 body=_body_params, 5386 post_params=_form_params, 5387 files=_files, 5388 response_types_map=_response_types_map, 5389 auth_settings=_auth_settings, 5390 async_req=_params.get('async_req'), 5391 _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 5392 _preload_content=_params.get('_preload_content', True), 5393 _request_timeout=_params.get('_request_timeout'), 5394 collection_formats=_collection_formats, 5395 _request_auth=_params.get('_request_auth'))