Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8888f4f

Browse files
Generator: Update SDK /services/authorization (#2327)
Co-authored-by: Ruben Hoenle <Ruben.Hoenle@stackit.cloud>
1 parentd7548ab commit8888f4f

File tree

8 files changed

+487
-1
lines changed

8 files changed

+487
-1
lines changed

‎CHANGELOG.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
##Release (2025-xx-xx)
2+
-`authorization`:[v0.4.0](services/authorization/CHANGELOG.md#v040)
3+
-**Feature**: Add support for assignable subjects
24
-`intake`:[v0.2.0](services/intake/CHANGELOG.md#v020)
35
-**Feature:** Add response`IntakeRunnerResponse` to`UpdateIntakeRunnerExecute` request
46
-**Feature:** Add response`IntakeUserResponse` to`UpdateIntakeUserExecute` request

‎services/authorization/CHANGELOG.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
##v0.4.0
2+
-**Feature**: Add support for assignable subjects
3+
14
##v0.3.0
25
-**Version**: Minimal version is now python 3.9
36

‎services/authorization/pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "stackit-authorization"
33

44
[tool.poetry]
55
name ="stackit-authorization"
6-
version ="v0.3.0"
6+
version ="v0.4.0"
77
authors = [
88
"STACKIT Developer Tools <developer-tools@stackit.cloud>",
99
]

‎services/authorization/src/stackit/authorization/__init__.py‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@
2929
"ApiAttributeError",
3030
"ApiException",
3131
"AddMembersPayload",
32+
"AssignableSubject",
3233
"ErrorResponse",
3334
"ExistingPermission",
35+
"ListAssignableSubjectsResponse",
3436
"ListMembersResponse",
3537
"ListPermissionsResponse",
3638
"ListUserMembershipsResponse",
@@ -64,10 +66,16 @@
6466
fromstackit.authorization.models.add_members_payloadimport (
6567
AddMembersPayloadasAddMembersPayload,
6668
)
69+
fromstackit.authorization.models.assignable_subjectimport (
70+
AssignableSubjectasAssignableSubject,
71+
)
6772
fromstackit.authorization.models.error_responseimportErrorResponseasErrorResponse
6873
fromstackit.authorization.models.existing_permissionimport (
6974
ExistingPermissionasExistingPermission,
7075
)
76+
fromstackit.authorization.models.list_assignable_subjects_responseimport (
77+
ListAssignableSubjectsResponseasListAssignableSubjectsResponse,
78+
)
7179
fromstackit.authorization.models.list_members_responseimport (
7280
ListMembersResponseasListMembersResponse,
7381
)

‎services/authorization/src/stackit/authorization/api/default_api.py‎

Lines changed: 270 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
fromstackit.authorization.api_clientimportApiClient,RequestSerialized
2121
fromstackit.authorization.api_responseimportApiResponse
2222
fromstackit.authorization.models.add_members_payloadimportAddMembersPayload
23+
fromstackit.authorization.models.list_assignable_subjects_responseimport (
24+
ListAssignableSubjectsResponse,
25+
)
2326
fromstackit.authorization.models.list_members_responseimportListMembersResponse
2427
fromstackit.authorization.models.list_permissions_responseimport (
2528
ListPermissionsResponse,
@@ -307,6 +310,273 @@ def _add_members_serialize(
307310
_request_auth=_request_auth,
308311
)
309312

313+
@validate_call
314+
defget_assignable_subjects(
315+
self,
316+
resource_type:StrictStr,
317+
resource_id:StrictStr,
318+
subject:Optional[StrictStr]=None,
319+
_request_timeout:Union[
320+
None,
321+
Annotated[StrictFloat,Field(gt=0)],
322+
Tuple[Annotated[StrictFloat,Field(gt=0)],Annotated[StrictFloat,Field(gt=0)]],
323+
]=None,
324+
_request_auth:Optional[Dict[StrictStr,Any]]=None,
325+
_content_type:Optional[StrictStr]=None,
326+
_headers:Optional[Dict[StrictStr,Any]]=None,
327+
_host_index:Annotated[StrictInt,Field(ge=0,le=0)]=0,
328+
)->ListAssignableSubjectsResponse:
329+
"""Get subjects assignable to a resource
330+
331+
BFF endpoint for portal. List subjects assignable to a given resource.
332+
333+
:param resource_type: (required)
334+
:type resource_type: str
335+
:param resource_id: (required)
336+
:type resource_id: str
337+
:param subject:
338+
:type subject: str
339+
:param _request_timeout: timeout setting for this request. If one
340+
number provided, it will be total request
341+
timeout. It can also be a pair (tuple) of
342+
(connection, read) timeouts.
343+
:type _request_timeout: int, tuple(int, int), optional
344+
:param _request_auth: set to override the auth_settings for an a single
345+
request; this effectively ignores the
346+
authentication in the spec for a single request.
347+
:type _request_auth: dict, optional
348+
:param _content_type: force content-type for the request.
349+
:type _content_type: str, Optional
350+
:param _headers: set to override the headers for a single
351+
request; this effectively ignores the headers
352+
in the spec for a single request.
353+
:type _headers: dict, optional
354+
:param _host_index: set to override the host_index for a single
355+
request; this effectively ignores the host_index
356+
in the spec for a single request.
357+
:type _host_index: int, optional
358+
:return: Returns the result object.
359+
"""# noqa: E501
360+
361+
_param=self._get_assignable_subjects_serialize(
362+
resource_type=resource_type,
363+
resource_id=resource_id,
364+
subject=subject,
365+
_request_auth=_request_auth,
366+
_content_type=_content_type,
367+
_headers=_headers,
368+
_host_index=_host_index,
369+
)
370+
371+
_response_types_map:Dict[str,Optional[str]]= {
372+
"200":"ListAssignableSubjectsResponse",
373+
"400":"ErrorResponse",
374+
"401":"ErrorResponse",
375+
"403":"ErrorResponse",
376+
}
377+
response_data=self.api_client.call_api(*_param,_request_timeout=_request_timeout)
378+
response_data.read()
379+
returnself.api_client.response_deserialize(
380+
response_data=response_data,
381+
response_types_map=_response_types_map,
382+
).data
383+
384+
@validate_call
385+
defget_assignable_subjects_with_http_info(
386+
self,
387+
resource_type:StrictStr,
388+
resource_id:StrictStr,
389+
subject:Optional[StrictStr]=None,
390+
_request_timeout:Union[
391+
None,
392+
Annotated[StrictFloat,Field(gt=0)],
393+
Tuple[Annotated[StrictFloat,Field(gt=0)],Annotated[StrictFloat,Field(gt=0)]],
394+
]=None,
395+
_request_auth:Optional[Dict[StrictStr,Any]]=None,
396+
_content_type:Optional[StrictStr]=None,
397+
_headers:Optional[Dict[StrictStr,Any]]=None,
398+
_host_index:Annotated[StrictInt,Field(ge=0,le=0)]=0,
399+
)->ApiResponse[ListAssignableSubjectsResponse]:
400+
"""Get subjects assignable to a resource
401+
402+
BFF endpoint for portal. List subjects assignable to a given resource.
403+
404+
:param resource_type: (required)
405+
:type resource_type: str
406+
:param resource_id: (required)
407+
:type resource_id: str
408+
:param subject:
409+
:type subject: str
410+
:param _request_timeout: timeout setting for this request. If one
411+
number provided, it will be total request
412+
timeout. It can also be a pair (tuple) of
413+
(connection, read) timeouts.
414+
:type _request_timeout: int, tuple(int, int), optional
415+
:param _request_auth: set to override the auth_settings for an a single
416+
request; this effectively ignores the
417+
authentication in the spec for a single request.
418+
:type _request_auth: dict, optional
419+
:param _content_type: force content-type for the request.
420+
:type _content_type: str, Optional
421+
:param _headers: set to override the headers for a single
422+
request; this effectively ignores the headers
423+
in the spec for a single request.
424+
:type _headers: dict, optional
425+
:param _host_index: set to override the host_index for a single
426+
request; this effectively ignores the host_index
427+
in the spec for a single request.
428+
:type _host_index: int, optional
429+
:return: Returns the result object.
430+
"""# noqa: E501
431+
432+
_param=self._get_assignable_subjects_serialize(
433+
resource_type=resource_type,
434+
resource_id=resource_id,
435+
subject=subject,
436+
_request_auth=_request_auth,
437+
_content_type=_content_type,
438+
_headers=_headers,
439+
_host_index=_host_index,
440+
)
441+
442+
_response_types_map:Dict[str,Optional[str]]= {
443+
"200":"ListAssignableSubjectsResponse",
444+
"400":"ErrorResponse",
445+
"401":"ErrorResponse",
446+
"403":"ErrorResponse",
447+
}
448+
response_data=self.api_client.call_api(*_param,_request_timeout=_request_timeout)
449+
response_data.read()
450+
returnself.api_client.response_deserialize(
451+
response_data=response_data,
452+
response_types_map=_response_types_map,
453+
)
454+
455+
@validate_call
456+
defget_assignable_subjects_without_preload_content(
457+
self,
458+
resource_type:StrictStr,
459+
resource_id:StrictStr,
460+
subject:Optional[StrictStr]=None,
461+
_request_timeout:Union[
462+
None,
463+
Annotated[StrictFloat,Field(gt=0)],
464+
Tuple[Annotated[StrictFloat,Field(gt=0)],Annotated[StrictFloat,Field(gt=0)]],
465+
]=None,
466+
_request_auth:Optional[Dict[StrictStr,Any]]=None,
467+
_content_type:Optional[StrictStr]=None,
468+
_headers:Optional[Dict[StrictStr,Any]]=None,
469+
_host_index:Annotated[StrictInt,Field(ge=0,le=0)]=0,
470+
)->RESTResponseType:
471+
"""Get subjects assignable to a resource
472+
473+
BFF endpoint for portal. List subjects assignable to a given resource.
474+
475+
:param resource_type: (required)
476+
:type resource_type: str
477+
:param resource_id: (required)
478+
:type resource_id: str
479+
:param subject:
480+
:type subject: str
481+
:param _request_timeout: timeout setting for this request. If one
482+
number provided, it will be total request
483+
timeout. It can also be a pair (tuple) of
484+
(connection, read) timeouts.
485+
:type _request_timeout: int, tuple(int, int), optional
486+
:param _request_auth: set to override the auth_settings for an a single
487+
request; this effectively ignores the
488+
authentication in the spec for a single request.
489+
:type _request_auth: dict, optional
490+
:param _content_type: force content-type for the request.
491+
:type _content_type: str, Optional
492+
:param _headers: set to override the headers for a single
493+
request; this effectively ignores the headers
494+
in the spec for a single request.
495+
:type _headers: dict, optional
496+
:param _host_index: set to override the host_index for a single
497+
request; this effectively ignores the host_index
498+
in the spec for a single request.
499+
:type _host_index: int, optional
500+
:return: Returns the result object.
501+
"""# noqa: E501
502+
503+
_param=self._get_assignable_subjects_serialize(
504+
resource_type=resource_type,
505+
resource_id=resource_id,
506+
subject=subject,
507+
_request_auth=_request_auth,
508+
_content_type=_content_type,
509+
_headers=_headers,
510+
_host_index=_host_index,
511+
)
512+
513+
_response_types_map:Dict[str,Optional[str]]= {
514+
"200":"ListAssignableSubjectsResponse",
515+
"400":"ErrorResponse",
516+
"401":"ErrorResponse",
517+
"403":"ErrorResponse",
518+
}
519+
response_data=self.api_client.call_api(*_param,_request_timeout=_request_timeout)
520+
returnresponse_data.response
521+
522+
def_get_assignable_subjects_serialize(
523+
self,
524+
resource_type,
525+
resource_id,
526+
subject,
527+
_request_auth,
528+
_content_type,
529+
_headers,
530+
_host_index,
531+
)->RequestSerialized:
532+
533+
_host=None
534+
535+
_collection_formats:Dict[str,str]= {}
536+
537+
_path_params:Dict[str,str]= {}
538+
_query_params:List[Tuple[str,str]]= []
539+
_header_params:Dict[str,Optional[str]]=_headersor {}
540+
_form_params:List[Tuple[str,str]]= []
541+
_files:Dict[str,Union[str,bytes,List[str],List[bytes],List[Tuple[str,bytes]]]]= {}
542+
_body_params:Optional[bytes]=None
543+
544+
# process the path parameters
545+
ifresource_typeisnotNone:
546+
_path_params["resourceType"]=resource_type
547+
ifresource_idisnotNone:
548+
_path_params["resourceId"]=resource_id
549+
# process the query parameters
550+
ifsubjectisnotNone:
551+
552+
_query_params.append(("subject",subject))
553+
554+
# process the header parameters
555+
# process the form parameters
556+
# process the body parameter
557+
558+
# set the HTTP header `Accept`
559+
if"Accept"notin_header_params:
560+
_header_params["Accept"]=self.api_client.select_header_accept(["application/json"])
561+
562+
# authentication setting
563+
_auth_settings:List[str]= []
564+
565+
returnself.api_client.param_serialize(
566+
method="GET",
567+
resource_path="/v2/bff/{resourceType}/{resourceId}/assignableSubjects",
568+
path_params=_path_params,
569+
query_params=_query_params,
570+
header_params=_header_params,
571+
body=_body_params,
572+
post_params=_form_params,
573+
files=_files,
574+
auth_settings=_auth_settings,
575+
collection_formats=_collection_formats,
576+
_host=_host,
577+
_request_auth=_request_auth,
578+
)
579+
310580
@validate_call
311581
deflist_members(
312582
self,

‎services/authorization/src/stackit/authorization/models/__init__.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@
1515

1616
# import models into model package
1717
fromstackit.authorization.models.add_members_payloadimportAddMembersPayload
18+
fromstackit.authorization.models.assignable_subjectimportAssignableSubject
1819
fromstackit.authorization.models.error_responseimportErrorResponse
1920
fromstackit.authorization.models.existing_permissionimportExistingPermission
21+
fromstackit.authorization.models.list_assignable_subjects_responseimport (
22+
ListAssignableSubjectsResponse,
23+
)
2024
fromstackit.authorization.models.list_members_responseimportListMembersResponse
2125
fromstackit.authorization.models.list_permissions_responseimport (
2226
ListPermissionsResponse,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp