diff --git a/services/secretsmanager/oas_commit b/services/secretsmanager/oas_commit index e3713dde3..ff55ac528 100644 --- a/services/secretsmanager/oas_commit +++ b/services/secretsmanager/oas_commit @@ -1 +1 @@ -0e64886dd0847341800d7191ed193b75413be998 +3df0883790f0871059396e505f52aeddd089d0ef diff --git a/services/secretsmanager/src/stackit/secretsmanager/__init__.py b/services/secretsmanager/src/stackit/secretsmanager/__init__.py index 103e68e3f..24edd2971 100644 --- a/services/secretsmanager/src/stackit/secretsmanager/__init__.py +++ b/services/secretsmanager/src/stackit/secretsmanager/__init__.py @@ -28,9 +28,15 @@ "ApiAttributeError", "ApiException", "ACL", + "Approle", + "ApproleList", + "ApproleSecret", + "ApproleSecretList", "BadRequest", "Conflict", "CreateACLPayload", + "CreateApprolePayload", + "CreateApproleSecretIdPayload", "CreateInstancePayload", "CreateUserPayload", "Instance", @@ -41,6 +47,8 @@ "NotFound", "UpdateACLPayload", "UpdateACLsPayload", + "UpdateApprolePayload", + "UpdateApproleSecretIdPayload", "UpdateInstancePayload", "UpdateUserPayload", "User", @@ -62,11 +70,23 @@ # import models into sdk package from stackit.secretsmanager.models.acl import ACL as ACL +from stackit.secretsmanager.models.approle import Approle as Approle +from stackit.secretsmanager.models.approle_list import ApproleList as ApproleList +from stackit.secretsmanager.models.approle_secret import ApproleSecret as ApproleSecret +from stackit.secretsmanager.models.approle_secret_list import ( + ApproleSecretList as ApproleSecretList, +) from stackit.secretsmanager.models.bad_request import BadRequest as BadRequest from stackit.secretsmanager.models.conflict import Conflict as Conflict from stackit.secretsmanager.models.create_acl_payload import ( CreateACLPayload as CreateACLPayload, ) +from stackit.secretsmanager.models.create_approle_payload import ( + CreateApprolePayload as CreateApprolePayload, +) +from stackit.secretsmanager.models.create_approle_secret_id_payload import ( + CreateApproleSecretIdPayload as CreateApproleSecretIdPayload, +) from stackit.secretsmanager.models.create_instance_payload import ( CreateInstancePayload as CreateInstancePayload, ) @@ -91,6 +111,12 @@ from stackit.secretsmanager.models.update_acls_payload import ( UpdateACLsPayload as UpdateACLsPayload, ) +from stackit.secretsmanager.models.update_approle_payload import ( + UpdateApprolePayload as UpdateApprolePayload, +) +from stackit.secretsmanager.models.update_approle_secret_id_payload import ( + UpdateApproleSecretIdPayload as UpdateApproleSecretIdPayload, +) from stackit.secretsmanager.models.update_instance_payload import ( UpdateInstancePayload as UpdateInstancePayload, ) diff --git a/services/secretsmanager/src/stackit/secretsmanager/api/default_api.py b/services/secretsmanager/src/stackit/secretsmanager/api/default_api.py index 2bddfebb7..360c54dc0 100644 --- a/services/secretsmanager/src/stackit/secretsmanager/api/default_api.py +++ b/services/secretsmanager/src/stackit/secretsmanager/api/default_api.py @@ -21,7 +21,15 @@ from stackit.secretsmanager.api_client import ApiClient, RequestSerialized from stackit.secretsmanager.api_response import ApiResponse from stackit.secretsmanager.models.acl import ACL +from stackit.secretsmanager.models.approle import Approle +from stackit.secretsmanager.models.approle_list import ApproleList +from stackit.secretsmanager.models.approle_secret import ApproleSecret +from stackit.secretsmanager.models.approle_secret_list import ApproleSecretList from stackit.secretsmanager.models.create_acl_payload import CreateACLPayload +from stackit.secretsmanager.models.create_approle_payload import CreateApprolePayload +from stackit.secretsmanager.models.create_approle_secret_id_payload import ( + CreateApproleSecretIdPayload, +) from stackit.secretsmanager.models.create_instance_payload import CreateInstancePayload from stackit.secretsmanager.models.create_user_payload import CreateUserPayload from stackit.secretsmanager.models.instance import Instance @@ -30,6 +38,10 @@ from stackit.secretsmanager.models.list_users_response import ListUsersResponse from stackit.secretsmanager.models.update_acl_payload import UpdateACLPayload from stackit.secretsmanager.models.update_acls_payload import UpdateACLsPayload +from stackit.secretsmanager.models.update_approle_payload import UpdateApprolePayload +from stackit.secretsmanager.models.update_approle_secret_id_payload import ( + UpdateApproleSecretIdPayload, +) from stackit.secretsmanager.models.update_instance_payload import UpdateInstancePayload from stackit.secretsmanager.models.update_user_payload import UpdateUserPayload from stackit.secretsmanager.models.user import User @@ -335,12 +347,13 @@ def _create_acl_serialize( ) @validate_call - def create_instance( + def create_approle( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") ], - create_instance_payload: CreateInstancePayload, + instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + create_approle_payload: CreateApprolePayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -350,15 +363,17 @@ def create_instance( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Instance: - """create_instance + ) -> Approle: + """create_approle - Creates a new Secrets Manager instance within the project. + Creates a new approle for the given Secrets Manager instance. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID - :param create_instance_payload: (required) - :type create_instance_payload: CreateInstancePayload + :param instance_id: The Secrets Manager instance UUID. (required) + :type instance_id: UUID + :param create_approle_payload: (required) + :type create_approle_payload: CreateApprolePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -381,9 +396,10 @@ def create_instance( :return: Returns the result object. """ # noqa: E501 - _param = self._create_instance_serialize( + _param = self._create_approle_serialize( project_id=project_id, - create_instance_payload=create_instance_payload, + instance_id=instance_id, + create_approle_payload=create_approle_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -391,9 +407,11 @@ def create_instance( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Instance", + "201": "Approle", "400": "BadRequest", "401": "str", + "404": "NotFound", + "409": "Conflict", "500": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -404,12 +422,13 @@ def create_instance( ).data @validate_call - def create_instance_with_http_info( + def create_approle_with_http_info( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") ], - create_instance_payload: CreateInstancePayload, + instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + create_approle_payload: CreateApprolePayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -419,15 +438,17 @@ def create_instance_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Instance]: - """create_instance + ) -> ApiResponse[Approle]: + """create_approle - Creates a new Secrets Manager instance within the project. + Creates a new approle for the given Secrets Manager instance. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID - :param create_instance_payload: (required) - :type create_instance_payload: CreateInstancePayload + :param instance_id: The Secrets Manager instance UUID. (required) + :type instance_id: UUID + :param create_approle_payload: (required) + :type create_approle_payload: CreateApprolePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -450,9 +471,10 @@ def create_instance_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_instance_serialize( + _param = self._create_approle_serialize( project_id=project_id, - create_instance_payload=create_instance_payload, + instance_id=instance_id, + create_approle_payload=create_approle_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -460,9 +482,11 @@ def create_instance_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Instance", + "201": "Approle", "400": "BadRequest", "401": "str", + "404": "NotFound", + "409": "Conflict", "500": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -473,12 +497,13 @@ def create_instance_with_http_info( ) @validate_call - def create_instance_without_preload_content( + def create_approle_without_preload_content( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") ], - create_instance_payload: CreateInstancePayload, + instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + create_approle_payload: CreateApprolePayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -489,14 +514,16 @@ def create_instance_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """create_instance + """create_approle - Creates a new Secrets Manager instance within the project. + Creates a new approle for the given Secrets Manager instance. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID - :param create_instance_payload: (required) - :type create_instance_payload: CreateInstancePayload + :param instance_id: The Secrets Manager instance UUID. (required) + :type instance_id: UUID + :param create_approle_payload: (required) + :type create_approle_payload: CreateApprolePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -519,9 +546,10 @@ def create_instance_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_instance_serialize( + _param = self._create_approle_serialize( project_id=project_id, - create_instance_payload=create_instance_payload, + instance_id=instance_id, + create_approle_payload=create_approle_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -529,18 +557,21 @@ def create_instance_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Instance", + "201": "Approle", "400": "BadRequest", "401": "str", + "404": "NotFound", + "409": "Conflict", "500": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_instance_serialize( + def _create_approle_serialize( self, project_id, - create_instance_payload, + instance_id, + create_approle_payload, _request_auth, _content_type, _headers, @@ -561,12 +592,14 @@ def _create_instance_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id + if instance_id is not None: + _path_params["instanceId"] = instance_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if create_instance_payload is not None: - _body_params = create_instance_payload + if create_approle_payload is not None: + _body_params = create_approle_payload # set the HTTP header `Accept` if "Accept" not in _header_params: @@ -585,7 +618,7 @@ def _create_instance_serialize( return self.api_client.param_serialize( method="POST", - resource_path="/v1/projects/{projectId}/instances", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/approles", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -599,13 +632,14 @@ def _create_instance_serialize( ) @validate_call - def create_user( + def create_approle_secret_id( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") ], instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], - create_user_payload: CreateUserPayload, + role_id: Annotated[UUID, Field(description="The approle with permissions on the Secrets Manager instance.")], + create_approle_secret_id_payload: CreateApproleSecretIdPayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -615,17 +649,19 @@ def create_user( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> User: - """create_user + ) -> ApproleSecret: + """create_approle_secret_id - Creates a new user for the given Secrets Manager instance. + Generate new secret id for the given approle. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID :param instance_id: The Secrets Manager instance UUID. (required) :type instance_id: UUID - :param create_user_payload: (required) - :type create_user_payload: CreateUserPayload + :param role_id: The approle with permissions on the Secrets Manager instance. (required) + :type role_id: UUID + :param create_approle_secret_id_payload: (required) + :type create_approle_secret_id_payload: CreateApproleSecretIdPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -648,10 +684,11 @@ def create_user( :return: Returns the result object. """ # noqa: E501 - _param = self._create_user_serialize( + _param = self._create_approle_secret_id_serialize( project_id=project_id, instance_id=instance_id, - create_user_payload=create_user_payload, + role_id=role_id, + create_approle_secret_id_payload=create_approle_secret_id_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -659,11 +696,10 @@ def create_user( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "User", + "201": "ApproleSecret", "400": "BadRequest", "401": "str", "404": "NotFound", - "409": "Conflict", "500": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -674,13 +710,14 @@ def create_user( ).data @validate_call - def create_user_with_http_info( + def create_approle_secret_id_with_http_info( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") ], instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], - create_user_payload: CreateUserPayload, + role_id: Annotated[UUID, Field(description="The approle with permissions on the Secrets Manager instance.")], + create_approle_secret_id_payload: CreateApproleSecretIdPayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -690,17 +727,19 @@ def create_user_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[User]: - """create_user + ) -> ApiResponse[ApproleSecret]: + """create_approle_secret_id - Creates a new user for the given Secrets Manager instance. + Generate new secret id for the given approle. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID :param instance_id: The Secrets Manager instance UUID. (required) :type instance_id: UUID - :param create_user_payload: (required) - :type create_user_payload: CreateUserPayload + :param role_id: The approle with permissions on the Secrets Manager instance. (required) + :type role_id: UUID + :param create_approle_secret_id_payload: (required) + :type create_approle_secret_id_payload: CreateApproleSecretIdPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -723,10 +762,11 @@ def create_user_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_user_serialize( + _param = self._create_approle_secret_id_serialize( project_id=project_id, instance_id=instance_id, - create_user_payload=create_user_payload, + role_id=role_id, + create_approle_secret_id_payload=create_approle_secret_id_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -734,11 +774,10 @@ def create_user_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "User", + "201": "ApproleSecret", "400": "BadRequest", "401": "str", "404": "NotFound", - "409": "Conflict", "500": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -749,13 +788,14 @@ def create_user_with_http_info( ) @validate_call - def create_user_without_preload_content( + def create_approle_secret_id_without_preload_content( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") ], instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], - create_user_payload: CreateUserPayload, + role_id: Annotated[UUID, Field(description="The approle with permissions on the Secrets Manager instance.")], + create_approle_secret_id_payload: CreateApproleSecretIdPayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -766,16 +806,18 @@ def create_user_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """create_user + """create_approle_secret_id - Creates a new user for the given Secrets Manager instance. + Generate new secret id for the given approle. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID :param instance_id: The Secrets Manager instance UUID. (required) :type instance_id: UUID - :param create_user_payload: (required) - :type create_user_payload: CreateUserPayload + :param role_id: The approle with permissions on the Secrets Manager instance. (required) + :type role_id: UUID + :param create_approle_secret_id_payload: (required) + :type create_approle_secret_id_payload: CreateApproleSecretIdPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -798,10 +840,11 @@ def create_user_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_user_serialize( + _param = self._create_approle_secret_id_serialize( project_id=project_id, instance_id=instance_id, - create_user_payload=create_user_payload, + role_id=role_id, + create_approle_secret_id_payload=create_approle_secret_id_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -809,21 +852,21 @@ def create_user_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "User", + "201": "ApproleSecret", "400": "BadRequest", "401": "str", "404": "NotFound", - "409": "Conflict", "500": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_user_serialize( + def _create_approle_secret_id_serialize( self, project_id, instance_id, - create_user_payload, + role_id, + create_approle_secret_id_payload, _request_auth, _content_type, _headers, @@ -846,12 +889,14 @@ def _create_user_serialize( _path_params["projectId"] = project_id if instance_id is not None: _path_params["instanceId"] = instance_id + if role_id is not None: + _path_params["roleId"] = role_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if create_user_payload is not None: - _body_params = create_user_payload + if create_approle_secret_id_payload is not None: + _body_params = create_approle_secret_id_payload # set the HTTP header `Accept` if "Accept" not in _header_params: @@ -870,7 +915,7 @@ def _create_user_serialize( return self.api_client.param_serialize( method="POST", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/users", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/approles/{roleId}/secretids", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -884,13 +929,12 @@ def _create_user_serialize( ) @validate_call - def delete_acl( + def create_instance( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") ], - instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], - acl_id: Annotated[UUID, Field(description="The acl UUID of the Secrets Manager instance.")], + create_instance_payload: CreateInstancePayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -900,17 +944,15 @@ def delete_acl( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """delete_acl + ) -> Instance: + """create_instance - Deletes the given acl. + Creates a new Secrets Manager instance within the project. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID - :param instance_id: The Secrets Manager instance UUID. (required) - :type instance_id: UUID - :param acl_id: The acl UUID of the Secrets Manager instance. (required) - :type acl_id: UUID + :param create_instance_payload: (required) + :type create_instance_payload: CreateInstancePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -933,10 +975,9 @@ def delete_acl( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_acl_serialize( + _param = self._create_instance_serialize( project_id=project_id, - instance_id=instance_id, - acl_id=acl_id, + create_instance_payload=create_instance_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -944,10 +985,9 @@ def delete_acl( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "201": "Instance", "400": "BadRequest", "401": "str", - "404": "NotFound", "500": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -958,13 +998,12 @@ def delete_acl( ).data @validate_call - def delete_acl_with_http_info( + def create_instance_with_http_info( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") ], - instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], - acl_id: Annotated[UUID, Field(description="The acl UUID of the Secrets Manager instance.")], + create_instance_payload: CreateInstancePayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -974,17 +1013,15 @@ def delete_acl_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """delete_acl + ) -> ApiResponse[Instance]: + """create_instance - Deletes the given acl. + Creates a new Secrets Manager instance within the project. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID - :param instance_id: The Secrets Manager instance UUID. (required) - :type instance_id: UUID - :param acl_id: The acl UUID of the Secrets Manager instance. (required) - :type acl_id: UUID + :param create_instance_payload: (required) + :type create_instance_payload: CreateInstancePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1007,10 +1044,9 @@ def delete_acl_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_acl_serialize( + _param = self._create_instance_serialize( project_id=project_id, - instance_id=instance_id, - acl_id=acl_id, + create_instance_payload=create_instance_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1018,10 +1054,9 @@ def delete_acl_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "201": "Instance", "400": "BadRequest", "401": "str", - "404": "NotFound", "500": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -1032,13 +1067,12 @@ def delete_acl_with_http_info( ) @validate_call - def delete_acl_without_preload_content( + def create_instance_without_preload_content( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") ], - instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], - acl_id: Annotated[UUID, Field(description="The acl UUID of the Secrets Manager instance.")], + create_instance_payload: CreateInstancePayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1049,16 +1083,14 @@ def delete_acl_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """delete_acl + """create_instance - Deletes the given acl. + Creates a new Secrets Manager instance within the project. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID - :param instance_id: The Secrets Manager instance UUID. (required) - :type instance_id: UUID - :param acl_id: The acl UUID of the Secrets Manager instance. (required) - :type acl_id: UUID + :param create_instance_payload: (required) + :type create_instance_payload: CreateInstancePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1081,10 +1113,9 @@ def delete_acl_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_acl_serialize( + _param = self._create_instance_serialize( project_id=project_id, - instance_id=instance_id, - acl_id=acl_id, + create_instance_payload=create_instance_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1092,7 +1123,2765 @@ def delete_acl_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "201": "Instance", + "400": "BadRequest", + "401": "str", + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _create_instance_serialize( + self, + project_id, + create_instance_payload, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params["projectId"] = project_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_instance_payload is not None: + _body_params = create_instance_payload + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json", "text/plain"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="POST", + resource_path="/v1/projects/{projectId}/instances", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def create_user( + self, + project_id: Annotated[ + UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") + ], + instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + create_user_payload: CreateUserPayload, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> User: + """create_user + + Creates a new user for the given Secrets Manager instance. + + :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) + :type project_id: UUID + :param instance_id: The Secrets Manager instance UUID. (required) + :type instance_id: UUID + :param create_user_payload: (required) + :type create_user_payload: CreateUserPayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_user_serialize( + project_id=project_id, + instance_id=instance_id, + create_user_payload=create_user_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "User", + "400": "BadRequest", + "401": "str", + "404": "NotFound", + "409": "Conflict", + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def create_user_with_http_info( + self, + project_id: Annotated[ + UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") + ], + instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + create_user_payload: CreateUserPayload, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[User]: + """create_user + + Creates a new user for the given Secrets Manager instance. + + :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) + :type project_id: UUID + :param instance_id: The Secrets Manager instance UUID. (required) + :type instance_id: UUID + :param create_user_payload: (required) + :type create_user_payload: CreateUserPayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_user_serialize( + project_id=project_id, + instance_id=instance_id, + create_user_payload=create_user_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "User", + "400": "BadRequest", + "401": "str", + "404": "NotFound", + "409": "Conflict", + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def create_user_without_preload_content( + self, + project_id: Annotated[ + UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") + ], + instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + create_user_payload: CreateUserPayload, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """create_user + + Creates a new user for the given Secrets Manager instance. + + :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) + :type project_id: UUID + :param instance_id: The Secrets Manager instance UUID. (required) + :type instance_id: UUID + :param create_user_payload: (required) + :type create_user_payload: CreateUserPayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_user_serialize( + project_id=project_id, + instance_id=instance_id, + create_user_payload=create_user_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "User", + "400": "BadRequest", + "401": "str", + "404": "NotFound", + "409": "Conflict", + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _create_user_serialize( + self, + project_id, + instance_id, + create_user_payload, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params["projectId"] = project_id + if instance_id is not None: + _path_params["instanceId"] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_user_payload is not None: + _body_params = create_user_payload + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json", "text/plain"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="POST", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/users", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def delete_acl( + self, + project_id: Annotated[ + UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") + ], + instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + acl_id: Annotated[UUID, Field(description="The acl UUID of the Secrets Manager instance.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_acl + + Deletes the given acl. + + :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) + :type project_id: UUID + :param instance_id: The Secrets Manager instance UUID. (required) + :type instance_id: UUID + :param acl_id: The acl UUID of the Secrets Manager instance. (required) + :type acl_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_acl_serialize( + project_id=project_id, + instance_id=instance_id, + acl_id=acl_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "BadRequest", + "401": "str", + "404": "NotFound", + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def delete_acl_with_http_info( + self, + project_id: Annotated[ + UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") + ], + instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + acl_id: Annotated[UUID, Field(description="The acl UUID of the Secrets Manager instance.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_acl + + Deletes the given acl. + + :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) + :type project_id: UUID + :param instance_id: The Secrets Manager instance UUID. (required) + :type instance_id: UUID + :param acl_id: The acl UUID of the Secrets Manager instance. (required) + :type acl_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_acl_serialize( + project_id=project_id, + instance_id=instance_id, + acl_id=acl_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "BadRequest", + "401": "str", + "404": "NotFound", + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_acl_without_preload_content( + self, + project_id: Annotated[ + UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") + ], + instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + acl_id: Annotated[UUID, Field(description="The acl UUID of the Secrets Manager instance.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_acl + + Deletes the given acl. + + :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) + :type project_id: UUID + :param instance_id: The Secrets Manager instance UUID. (required) + :type instance_id: UUID + :param acl_id: The acl UUID of the Secrets Manager instance. (required) + :type acl_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_acl_serialize( + project_id=project_id, + instance_id=instance_id, + acl_id=acl_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "BadRequest", + "401": "str", + "404": "NotFound", + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_acl_serialize( + self, + project_id, + instance_id, + acl_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params["projectId"] = project_id + if instance_id is not None: + _path_params["instanceId"] = instance_id + if acl_id is not None: + _path_params["aclId"] = acl_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json", "text/plain"]) + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/acls/{aclId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def delete_approle( + self, + project_id: Annotated[ + UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") + ], + instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + role_id: Annotated[UUID, Field(description="The approle with permissions on the Secrets Manager instance.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_approle + + Deletes the given approle. + + :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) + :type project_id: UUID + :param instance_id: The Secrets Manager instance UUID. (required) + :type instance_id: UUID + :param role_id: The approle with permissions on the Secrets Manager instance. (required) + :type role_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_approle_serialize( + project_id=project_id, + instance_id=instance_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "BadRequest", + "401": "str", + "404": "NotFound", + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def delete_approle_with_http_info( + self, + project_id: Annotated[ + UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") + ], + instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + role_id: Annotated[UUID, Field(description="The approle with permissions on the Secrets Manager instance.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_approle + + Deletes the given approle. + + :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) + :type project_id: UUID + :param instance_id: The Secrets Manager instance UUID. (required) + :type instance_id: UUID + :param role_id: The approle with permissions on the Secrets Manager instance. (required) + :type role_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_approle_serialize( + project_id=project_id, + instance_id=instance_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "BadRequest", + "401": "str", + "404": "NotFound", + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_approle_without_preload_content( + self, + project_id: Annotated[ + UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") + ], + instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + role_id: Annotated[UUID, Field(description="The approle with permissions on the Secrets Manager instance.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_approle + + Deletes the given approle. + + :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) + :type project_id: UUID + :param instance_id: The Secrets Manager instance UUID. (required) + :type instance_id: UUID + :param role_id: The approle with permissions on the Secrets Manager instance. (required) + :type role_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_approle_serialize( + project_id=project_id, + instance_id=instance_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "BadRequest", + "401": "str", + "404": "NotFound", + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_approle_serialize( + self, + project_id, + instance_id, + role_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params["projectId"] = project_id + if instance_id is not None: + _path_params["instanceId"] = instance_id + if role_id is not None: + _path_params["roleId"] = role_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json", "text/plain"]) + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/approles/{roleId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def delete_approle_secret_id( + self, + project_id: Annotated[ + UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") + ], + instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + role_id: Annotated[UUID, Field(description="The approle with permissions on the Secrets Manager instance.")], + secret_id_version: Annotated[StrictInt, Field(description="The version of the secret id.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_approle_secret_id + + Deletes the secret id by its given version. + + :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) + :type project_id: UUID + :param instance_id: The Secrets Manager instance UUID. (required) + :type instance_id: UUID + :param role_id: The approle with permissions on the Secrets Manager instance. (required) + :type role_id: UUID + :param secret_id_version: The version of the secret id. (required) + :type secret_id_version: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_approle_secret_id_serialize( + project_id=project_id, + instance_id=instance_id, + role_id=role_id, + secret_id_version=secret_id_version, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "BadRequest", + "401": "str", + "404": "NotFound", + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def delete_approle_secret_id_with_http_info( + self, + project_id: Annotated[ + UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") + ], + instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + role_id: Annotated[UUID, Field(description="The approle with permissions on the Secrets Manager instance.")], + secret_id_version: Annotated[StrictInt, Field(description="The version of the secret id.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_approle_secret_id + + Deletes the secret id by its given version. + + :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) + :type project_id: UUID + :param instance_id: The Secrets Manager instance UUID. (required) + :type instance_id: UUID + :param role_id: The approle with permissions on the Secrets Manager instance. (required) + :type role_id: UUID + :param secret_id_version: The version of the secret id. (required) + :type secret_id_version: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_approle_secret_id_serialize( + project_id=project_id, + instance_id=instance_id, + role_id=role_id, + secret_id_version=secret_id_version, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "BadRequest", + "401": "str", + "404": "NotFound", + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_approle_secret_id_without_preload_content( + self, + project_id: Annotated[ + UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") + ], + instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + role_id: Annotated[UUID, Field(description="The approle with permissions on the Secrets Manager instance.")], + secret_id_version: Annotated[StrictInt, Field(description="The version of the secret id.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_approle_secret_id + + Deletes the secret id by its given version. + + :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) + :type project_id: UUID + :param instance_id: The Secrets Manager instance UUID. (required) + :type instance_id: UUID + :param role_id: The approle with permissions on the Secrets Manager instance. (required) + :type role_id: UUID + :param secret_id_version: The version of the secret id. (required) + :type secret_id_version: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_approle_secret_id_serialize( + project_id=project_id, + instance_id=instance_id, + role_id=role_id, + secret_id_version=secret_id_version, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "BadRequest", + "401": "str", + "404": "NotFound", + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_approle_secret_id_serialize( + self, + project_id, + instance_id, + role_id, + secret_id_version, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params["projectId"] = project_id + if instance_id is not None: + _path_params["instanceId"] = instance_id + if role_id is not None: + _path_params["roleId"] = role_id + if secret_id_version is not None: + _path_params["secretIdVersion"] = secret_id_version + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json", "text/plain"]) + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/approles/{roleId}/secretids/{secretIdVersion}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def delete_instance( + self, + project_id: Annotated[ + UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") + ], + instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_instance + + Deletes the given Secrets Manager instance. + + :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) + :type project_id: UUID + :param instance_id: The Secrets Manager instance UUID. (required) + :type instance_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_instance_serialize( + project_id=project_id, + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "BadRequest", + "401": "str", + "404": "NotFound", + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def delete_instance_with_http_info( + self, + project_id: Annotated[ + UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") + ], + instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_instance + + Deletes the given Secrets Manager instance. + + :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) + :type project_id: UUID + :param instance_id: The Secrets Manager instance UUID. (required) + :type instance_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_instance_serialize( + project_id=project_id, + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "BadRequest", + "401": "str", + "404": "NotFound", + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_instance_without_preload_content( + self, + project_id: Annotated[ + UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") + ], + instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_instance + + Deletes the given Secrets Manager instance. + + :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) + :type project_id: UUID + :param instance_id: The Secrets Manager instance UUID. (required) + :type instance_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_instance_serialize( + project_id=project_id, + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "BadRequest", + "401": "str", + "404": "NotFound", + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_instance_serialize( + self, + project_id, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params["projectId"] = project_id + if instance_id is not None: + _path_params["instanceId"] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json", "text/plain"]) + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/v1/projects/{projectId}/instances/{instanceId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def delete_user( + self, + project_id: Annotated[ + UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") + ], + instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + user_id: Annotated[UUID, Field(description="The user UUID with permissions on the Secrets Manager instance.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_user + + Deletes the given user. + + :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) + :type project_id: UUID + :param instance_id: The Secrets Manager instance UUID. (required) + :type instance_id: UUID + :param user_id: The user UUID with permissions on the Secrets Manager instance. (required) + :type user_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_user_serialize( + project_id=project_id, + instance_id=instance_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "BadRequest", + "401": "str", + "404": "NotFound", + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def delete_user_with_http_info( + self, + project_id: Annotated[ + UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") + ], + instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + user_id: Annotated[UUID, Field(description="The user UUID with permissions on the Secrets Manager instance.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_user + + Deletes the given user. + + :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) + :type project_id: UUID + :param instance_id: The Secrets Manager instance UUID. (required) + :type instance_id: UUID + :param user_id: The user UUID with permissions on the Secrets Manager instance. (required) + :type user_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_user_serialize( + project_id=project_id, + instance_id=instance_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "BadRequest", + "401": "str", + "404": "NotFound", + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_user_without_preload_content( + self, + project_id: Annotated[ + UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") + ], + instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + user_id: Annotated[UUID, Field(description="The user UUID with permissions on the Secrets Manager instance.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_user + + Deletes the given user. + + :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) + :type project_id: UUID + :param instance_id: The Secrets Manager instance UUID. (required) + :type instance_id: UUID + :param user_id: The user UUID with permissions on the Secrets Manager instance. (required) + :type user_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_user_serialize( + project_id=project_id, + instance_id=instance_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "BadRequest", + "401": "str", + "404": "NotFound", + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_user_serialize( + self, + project_id, + instance_id, + user_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params["projectId"] = project_id + if instance_id is not None: + _path_params["instanceId"] = instance_id + if user_id is not None: + _path_params["userId"] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json", "text/plain"]) + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/users/{userId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_acl( + self, + project_id: Annotated[ + UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") + ], + instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + acl_id: Annotated[UUID, Field(description="The acl UUID of the Secrets Manager instance.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ACL: + """get_acl + + Returns the details for the given acl. + + :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) + :type project_id: UUID + :param instance_id: The Secrets Manager instance UUID. (required) + :type instance_id: UUID + :param acl_id: The acl UUID of the Secrets Manager instance. (required) + :type acl_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_acl_serialize( + project_id=project_id, + instance_id=instance_id, + acl_id=acl_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ACL", + "400": "BadRequest", + "401": "str", + "404": "NotFound", + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_acl_with_http_info( + self, + project_id: Annotated[ + UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") + ], + instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + acl_id: Annotated[UUID, Field(description="The acl UUID of the Secrets Manager instance.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ACL]: + """get_acl + + Returns the details for the given acl. + + :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) + :type project_id: UUID + :param instance_id: The Secrets Manager instance UUID. (required) + :type instance_id: UUID + :param acl_id: The acl UUID of the Secrets Manager instance. (required) + :type acl_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_acl_serialize( + project_id=project_id, + instance_id=instance_id, + acl_id=acl_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ACL", + "400": "BadRequest", + "401": "str", + "404": "NotFound", + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_acl_without_preload_content( + self, + project_id: Annotated[ + UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") + ], + instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + acl_id: Annotated[UUID, Field(description="The acl UUID of the Secrets Manager instance.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_acl + + Returns the details for the given acl. + + :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) + :type project_id: UUID + :param instance_id: The Secrets Manager instance UUID. (required) + :type instance_id: UUID + :param acl_id: The acl UUID of the Secrets Manager instance. (required) + :type acl_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_acl_serialize( + project_id=project_id, + instance_id=instance_id, + acl_id=acl_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ACL", + "400": "BadRequest", + "401": "str", + "404": "NotFound", + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_acl_serialize( + self, + project_id, + instance_id, + acl_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params["projectId"] = project_id + if instance_id is not None: + _path_params["instanceId"] = instance_id + if acl_id is not None: + _path_params["aclId"] = acl_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json", "text/plain"]) + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="GET", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/acls/{aclId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_approle( + self, + project_id: Annotated[ + UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") + ], + instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + role_id: Annotated[UUID, Field(description="The approle with permissions on the Secrets Manager instance.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Approle: + """get_approle + + Returns the details for the given approle. + + :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) + :type project_id: UUID + :param instance_id: The Secrets Manager instance UUID. (required) + :type instance_id: UUID + :param role_id: The approle with permissions on the Secrets Manager instance. (required) + :type role_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_approle_serialize( + project_id=project_id, + instance_id=instance_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "Approle", + "400": "BadRequest", + "401": "str", + "404": "NotFound", + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_approle_with_http_info( + self, + project_id: Annotated[ + UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") + ], + instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + role_id: Annotated[UUID, Field(description="The approle with permissions on the Secrets Manager instance.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Approle]: + """get_approle + + Returns the details for the given approle. + + :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) + :type project_id: UUID + :param instance_id: The Secrets Manager instance UUID. (required) + :type instance_id: UUID + :param role_id: The approle with permissions on the Secrets Manager instance. (required) + :type role_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_approle_serialize( + project_id=project_id, + instance_id=instance_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "Approle", + "400": "BadRequest", + "401": "str", + "404": "NotFound", + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_approle_without_preload_content( + self, + project_id: Annotated[ + UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") + ], + instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + role_id: Annotated[UUID, Field(description="The approle with permissions on the Secrets Manager instance.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_approle + + Returns the details for the given approle. + + :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) + :type project_id: UUID + :param instance_id: The Secrets Manager instance UUID. (required) + :type instance_id: UUID + :param role_id: The approle with permissions on the Secrets Manager instance. (required) + :type role_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_approle_serialize( + project_id=project_id, + instance_id=instance_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "Approle", + "400": "BadRequest", + "401": "str", + "404": "NotFound", + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_approle_serialize( + self, + project_id, + instance_id, + role_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params["projectId"] = project_id + if instance_id is not None: + _path_params["instanceId"] = instance_id + if role_id is not None: + _path_params["roleId"] = role_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json", "text/plain"]) + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="GET", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/approles/{roleId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_approle_secret_id( + self, + project_id: Annotated[ + UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") + ], + instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + role_id: Annotated[UUID, Field(description="The approle with permissions on the Secrets Manager instance.")], + secret_id_version: Annotated[StrictInt, Field(description="The version of the secret id.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApproleSecret: + """get_approle_secret_id + + Read the properties of a given secret id by its given version. + + :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) + :type project_id: UUID + :param instance_id: The Secrets Manager instance UUID. (required) + :type instance_id: UUID + :param role_id: The approle with permissions on the Secrets Manager instance. (required) + :type role_id: UUID + :param secret_id_version: The version of the secret id. (required) + :type secret_id_version: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_approle_secret_id_serialize( + project_id=project_id, + instance_id=instance_id, + role_id=role_id, + secret_id_version=secret_id_version, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ApproleSecret", + "400": "BadRequest", + "401": "str", + "404": "NotFound", + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_approle_secret_id_with_http_info( + self, + project_id: Annotated[ + UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") + ], + instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + role_id: Annotated[UUID, Field(description="The approle with permissions on the Secrets Manager instance.")], + secret_id_version: Annotated[StrictInt, Field(description="The version of the secret id.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApproleSecret]: + """get_approle_secret_id + + Read the properties of a given secret id by its given version. + + :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) + :type project_id: UUID + :param instance_id: The Secrets Manager instance UUID. (required) + :type instance_id: UUID + :param role_id: The approle with permissions on the Secrets Manager instance. (required) + :type role_id: UUID + :param secret_id_version: The version of the secret id. (required) + :type secret_id_version: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_approle_secret_id_serialize( + project_id=project_id, + instance_id=instance_id, + role_id=role_id, + secret_id_version=secret_id_version, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ApproleSecret", + "400": "BadRequest", + "401": "str", + "404": "NotFound", + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_approle_secret_id_without_preload_content( + self, + project_id: Annotated[ + UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") + ], + instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + role_id: Annotated[UUID, Field(description="The approle with permissions on the Secrets Manager instance.")], + secret_id_version: Annotated[StrictInt, Field(description="The version of the secret id.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_approle_secret_id + + Read the properties of a given secret id by its given version. + + :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) + :type project_id: UUID + :param instance_id: The Secrets Manager instance UUID. (required) + :type instance_id: UUID + :param role_id: The approle with permissions on the Secrets Manager instance. (required) + :type role_id: UUID + :param secret_id_version: The version of the secret id. (required) + :type secret_id_version: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_approle_secret_id_serialize( + project_id=project_id, + instance_id=instance_id, + role_id=role_id, + secret_id_version=secret_id_version, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ApproleSecret", + "400": "BadRequest", + "401": "str", + "404": "NotFound", + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_approle_secret_id_serialize( + self, + project_id, + instance_id, + role_id, + secret_id_version, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params["projectId"] = project_id + if instance_id is not None: + _path_params["instanceId"] = instance_id + if role_id is not None: + _path_params["roleId"] = role_id + if secret_id_version is not None: + _path_params["secretIdVersion"] = secret_id_version + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json", "text/plain"]) + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="GET", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/approles/{roleId}/secretids/{secretIdVersion}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_approles( + self, + project_id: Annotated[ + UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") + ], + instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApproleList: + """get_approles + + Returns the approles for the given Secrets Manager instance. + + :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) + :type project_id: UUID + :param instance_id: The Secrets Manager instance UUID. (required) + :type instance_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_approles_serialize( + project_id=project_id, + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ApproleList", + "400": "BadRequest", + "401": "str", + "404": "NotFound", + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_approles_with_http_info( + self, + project_id: Annotated[ + UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") + ], + instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApproleList]: + """get_approles + + Returns the approles for the given Secrets Manager instance. + + :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) + :type project_id: UUID + :param instance_id: The Secrets Manager instance UUID. (required) + :type instance_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_approles_serialize( + project_id=project_id, + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ApproleList", + "400": "BadRequest", + "401": "str", + "404": "NotFound", + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_approles_without_preload_content( + self, + project_id: Annotated[ + UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") + ], + instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_approles + + Returns the approles for the given Secrets Manager instance. + + :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) + :type project_id: UUID + :param instance_id: The Secrets Manager instance UUID. (required) + :type instance_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_approles_serialize( + project_id=project_id, + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ApproleList", "400": "BadRequest", "401": "str", "404": "NotFound", @@ -1101,11 +3890,10 @@ def delete_acl_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_acl_serialize( + def _get_approles_serialize( self, project_id, instance_id, - acl_id, _request_auth, _content_type, _headers, @@ -1128,8 +3916,6 @@ def _delete_acl_serialize( _path_params["projectId"] = project_id if instance_id is not None: _path_params["instanceId"] = instance_id - if acl_id is not None: - _path_params["aclId"] = acl_id # process the query parameters # process the header parameters # process the form parameters @@ -1143,8 +3929,8 @@ def _delete_acl_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/acls/{aclId}", + method="GET", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/approles", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1158,7 +3944,7 @@ def _delete_acl_serialize( ) @validate_call - def delete_instance( + def get_instance( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") @@ -1173,10 +3959,10 @@ def delete_instance( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """delete_instance + ) -> Instance: + """get_instance - Deletes the given Secrets Manager instance. + Returns the details for the given Secrets Manager instance. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID @@ -1204,7 +3990,7 @@ def delete_instance( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_instance_serialize( + _param = self._get_instance_serialize( project_id=project_id, instance_id=instance_id, _request_auth=_request_auth, @@ -1214,7 +4000,7 @@ def delete_instance( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "Instance", "400": "BadRequest", "401": "str", "404": "NotFound", @@ -1228,7 +4014,7 @@ def delete_instance( ).data @validate_call - def delete_instance_with_http_info( + def get_instance_with_http_info( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") @@ -1243,10 +4029,10 @@ def delete_instance_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """delete_instance + ) -> ApiResponse[Instance]: + """get_instance - Deletes the given Secrets Manager instance. + Returns the details for the given Secrets Manager instance. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID @@ -1274,7 +4060,7 @@ def delete_instance_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_instance_serialize( + _param = self._get_instance_serialize( project_id=project_id, instance_id=instance_id, _request_auth=_request_auth, @@ -1284,7 +4070,7 @@ def delete_instance_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "Instance", "400": "BadRequest", "401": "str", "404": "NotFound", @@ -1298,7 +4084,7 @@ def delete_instance_with_http_info( ) @validate_call - def delete_instance_without_preload_content( + def get_instance_without_preload_content( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") @@ -1314,9 +4100,9 @@ def delete_instance_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """delete_instance + """get_instance - Deletes the given Secrets Manager instance. + Returns the details for the given Secrets Manager instance. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID @@ -1344,7 +4130,7 @@ def delete_instance_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_instance_serialize( + _param = self._get_instance_serialize( project_id=project_id, instance_id=instance_id, _request_auth=_request_auth, @@ -1354,7 +4140,7 @@ def delete_instance_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "Instance", "400": "BadRequest", "401": "str", "404": "NotFound", @@ -1363,7 +4149,7 @@ def delete_instance_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_instance_serialize( + def _get_instance_serialize( self, project_id, instance_id, @@ -1402,7 +4188,7 @@ def _delete_instance_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="DELETE", + method="GET", resource_path="/v1/projects/{projectId}/instances/{instanceId}", path_params=_path_params, query_params=_query_params, @@ -1417,7 +4203,7 @@ def _delete_instance_serialize( ) @validate_call - def delete_user( + def get_user( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") @@ -1433,10 +4219,10 @@ def delete_user( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """delete_user + ) -> User: + """get_user - Deletes the given user. + Returns the details for the given user. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID @@ -1466,7 +4252,7 @@ def delete_user( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_user_serialize( + _param = self._get_user_serialize( project_id=project_id, instance_id=instance_id, user_id=user_id, @@ -1477,7 +4263,7 @@ def delete_user( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "User", "400": "BadRequest", "401": "str", "404": "NotFound", @@ -1491,7 +4277,7 @@ def delete_user( ).data @validate_call - def delete_user_with_http_info( + def get_user_with_http_info( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") @@ -1507,10 +4293,10 @@ def delete_user_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """delete_user + ) -> ApiResponse[User]: + """get_user - Deletes the given user. + Returns the details for the given user. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID @@ -1540,7 +4326,7 @@ def delete_user_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_user_serialize( + _param = self._get_user_serialize( project_id=project_id, instance_id=instance_id, user_id=user_id, @@ -1551,7 +4337,7 @@ def delete_user_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "User", "400": "BadRequest", "401": "str", "404": "NotFound", @@ -1565,7 +4351,7 @@ def delete_user_with_http_info( ) @validate_call - def delete_user_without_preload_content( + def get_user_without_preload_content( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") @@ -1582,9 +4368,9 @@ def delete_user_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """delete_user + """get_user - Deletes the given user. + Returns the details for the given user. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID @@ -1614,7 +4400,7 @@ def delete_user_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_user_serialize( + _param = self._get_user_serialize( project_id=project_id, instance_id=instance_id, user_id=user_id, @@ -1625,7 +4411,7 @@ def delete_user_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "User", "400": "BadRequest", "401": "str", "404": "NotFound", @@ -1634,7 +4420,7 @@ def delete_user_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_user_serialize( + def _get_user_serialize( self, project_id, instance_id, @@ -1676,7 +4462,7 @@ def _delete_user_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="DELETE", + method="GET", resource_path="/v1/projects/{projectId}/instances/{instanceId}/users/{userId}", path_params=_path_params, query_params=_query_params, @@ -1691,13 +4477,12 @@ def _delete_user_serialize( ) @validate_call - def get_acl( + def list_acls( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") ], instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], - acl_id: Annotated[UUID, Field(description="The acl UUID of the Secrets Manager instance.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1707,17 +4492,15 @@ def get_acl( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ACL: - """get_acl + ) -> ListACLsResponse: + """list_acls - Returns the details for the given acl. + Returns the acls for the given Secrets Manager instance. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID :param instance_id: The Secrets Manager instance UUID. (required) :type instance_id: UUID - :param acl_id: The acl UUID of the Secrets Manager instance. (required) - :type acl_id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1740,10 +4523,9 @@ def get_acl( :return: Returns the result object. """ # noqa: E501 - _param = self._get_acl_serialize( + _param = self._list_acls_serialize( project_id=project_id, instance_id=instance_id, - acl_id=acl_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1751,7 +4533,7 @@ def get_acl( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ACL", + "200": "ListACLsResponse", "400": "BadRequest", "401": "str", "404": "NotFound", @@ -1765,13 +4547,12 @@ def get_acl( ).data @validate_call - def get_acl_with_http_info( + def list_acls_with_http_info( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") ], instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], - acl_id: Annotated[UUID, Field(description="The acl UUID of the Secrets Manager instance.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1781,17 +4562,15 @@ def get_acl_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ACL]: - """get_acl + ) -> ApiResponse[ListACLsResponse]: + """list_acls - Returns the details for the given acl. + Returns the acls for the given Secrets Manager instance. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID :param instance_id: The Secrets Manager instance UUID. (required) :type instance_id: UUID - :param acl_id: The acl UUID of the Secrets Manager instance. (required) - :type acl_id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1814,10 +4593,9 @@ def get_acl_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_acl_serialize( + _param = self._list_acls_serialize( project_id=project_id, instance_id=instance_id, - acl_id=acl_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1825,7 +4603,7 @@ def get_acl_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ACL", + "200": "ListACLsResponse", "400": "BadRequest", "401": "str", "404": "NotFound", @@ -1839,13 +4617,12 @@ def get_acl_with_http_info( ) @validate_call - def get_acl_without_preload_content( + def list_acls_without_preload_content( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") ], instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], - acl_id: Annotated[UUID, Field(description="The acl UUID of the Secrets Manager instance.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1856,16 +4633,14 @@ def get_acl_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_acl + """list_acls - Returns the details for the given acl. + Returns the acls for the given Secrets Manager instance. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID :param instance_id: The Secrets Manager instance UUID. (required) :type instance_id: UUID - :param acl_id: The acl UUID of the Secrets Manager instance. (required) - :type acl_id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1888,10 +4663,9 @@ def get_acl_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_acl_serialize( + _param = self._list_acls_serialize( project_id=project_id, instance_id=instance_id, - acl_id=acl_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1899,7 +4673,7 @@ def get_acl_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ACL", + "200": "ListACLsResponse", "400": "BadRequest", "401": "str", "404": "NotFound", @@ -1908,11 +4682,10 @@ def get_acl_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_acl_serialize( + def _list_acls_serialize( self, project_id, instance_id, - acl_id, _request_auth, _content_type, _headers, @@ -1935,8 +4708,6 @@ def _get_acl_serialize( _path_params["projectId"] = project_id if instance_id is not None: _path_params["instanceId"] = instance_id - if acl_id is not None: - _path_params["aclId"] = acl_id # process the query parameters # process the header parameters # process the form parameters @@ -1951,7 +4722,7 @@ def _get_acl_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/acls/{aclId}", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/acls", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1965,12 +4736,13 @@ def _get_acl_serialize( ) @validate_call - def get_instance( + def list_approle_secret_ids( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") ], instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + role_id: Annotated[UUID, Field(description="The approle with permissions on the Secrets Manager instance.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1980,15 +4752,17 @@ def get_instance( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Instance: - """get_instance + ) -> ApproleSecretList: + """list_approle_secret_ids - Returns the details for the given Secrets Manager instance. + Returns the secret id list for the given Secrets Manager instance and approle. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID :param instance_id: The Secrets Manager instance UUID. (required) :type instance_id: UUID + :param role_id: The approle with permissions on the Secrets Manager instance. (required) + :type role_id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2011,9 +4785,10 @@ def get_instance( :return: Returns the result object. """ # noqa: E501 - _param = self._get_instance_serialize( + _param = self._list_approle_secret_ids_serialize( project_id=project_id, instance_id=instance_id, + role_id=role_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2021,7 +4796,7 @@ def get_instance( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Instance", + "200": "ApproleSecretList", "400": "BadRequest", "401": "str", "404": "NotFound", @@ -2035,12 +4810,13 @@ def get_instance( ).data @validate_call - def get_instance_with_http_info( + def list_approle_secret_ids_with_http_info( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") ], instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + role_id: Annotated[UUID, Field(description="The approle with permissions on the Secrets Manager instance.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2050,15 +4826,17 @@ def get_instance_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Instance]: - """get_instance + ) -> ApiResponse[ApproleSecretList]: + """list_approle_secret_ids - Returns the details for the given Secrets Manager instance. + Returns the secret id list for the given Secrets Manager instance and approle. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID :param instance_id: The Secrets Manager instance UUID. (required) :type instance_id: UUID + :param role_id: The approle with permissions on the Secrets Manager instance. (required) + :type role_id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2081,9 +4859,10 @@ def get_instance_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_instance_serialize( + _param = self._list_approle_secret_ids_serialize( project_id=project_id, instance_id=instance_id, + role_id=role_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2091,7 +4870,7 @@ def get_instance_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Instance", + "200": "ApproleSecretList", "400": "BadRequest", "401": "str", "404": "NotFound", @@ -2105,12 +4884,13 @@ def get_instance_with_http_info( ) @validate_call - def get_instance_without_preload_content( + def list_approle_secret_ids_without_preload_content( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") ], instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + role_id: Annotated[UUID, Field(description="The approle with permissions on the Secrets Manager instance.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2121,14 +4901,16 @@ def get_instance_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_instance + """list_approle_secret_ids - Returns the details for the given Secrets Manager instance. + Returns the secret id list for the given Secrets Manager instance and approle. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID :param instance_id: The Secrets Manager instance UUID. (required) :type instance_id: UUID + :param role_id: The approle with permissions on the Secrets Manager instance. (required) + :type role_id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2151,9 +4933,10 @@ def get_instance_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_instance_serialize( + _param = self._list_approle_secret_ids_serialize( project_id=project_id, instance_id=instance_id, + role_id=role_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2161,7 +4944,7 @@ def get_instance_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Instance", + "200": "ApproleSecretList", "400": "BadRequest", "401": "str", "404": "NotFound", @@ -2170,10 +4953,11 @@ def get_instance_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_instance_serialize( + def _list_approle_secret_ids_serialize( self, project_id, instance_id, + role_id, _request_auth, _content_type, _headers, @@ -2196,6 +4980,8 @@ def _get_instance_serialize( _path_params["projectId"] = project_id if instance_id is not None: _path_params["instanceId"] = instance_id + if role_id is not None: + _path_params["roleId"] = role_id # process the query parameters # process the header parameters # process the form parameters @@ -2210,7 +4996,7 @@ def _get_instance_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/instances/{instanceId}", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/approles/{roleId}/secretids", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2224,13 +5010,11 @@ def _get_instance_serialize( ) @validate_call - def get_user( + def list_instances( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") ], - instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], - user_id: Annotated[UUID, Field(description="The user UUID with permissions on the Secrets Manager instance.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2240,17 +5024,13 @@ def get_user( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> User: - """get_user + ) -> ListInstancesResponse: + """list_instances - Returns the details for the given user. + Returns a list of all Secrets Manager instances within the project. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID - :param instance_id: The Secrets Manager instance UUID. (required) - :type instance_id: UUID - :param user_id: The user UUID with permissions on the Secrets Manager instance. (required) - :type user_id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2273,10 +5053,8 @@ def get_user( :return: Returns the result object. """ # noqa: E501 - _param = self._get_user_serialize( + _param = self._list_instances_serialize( project_id=project_id, - instance_id=instance_id, - user_id=user_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2284,10 +5062,9 @@ def get_user( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "User", + "200": "ListInstancesResponse", "400": "BadRequest", "401": "str", - "404": "NotFound", "500": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -2298,13 +5075,11 @@ def get_user( ).data @validate_call - def get_user_with_http_info( + def list_instances_with_http_info( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") ], - instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], - user_id: Annotated[UUID, Field(description="The user UUID with permissions on the Secrets Manager instance.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2314,17 +5089,13 @@ def get_user_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[User]: - """get_user + ) -> ApiResponse[ListInstancesResponse]: + """list_instances - Returns the details for the given user. + Returns a list of all Secrets Manager instances within the project. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID - :param instance_id: The Secrets Manager instance UUID. (required) - :type instance_id: UUID - :param user_id: The user UUID with permissions on the Secrets Manager instance. (required) - :type user_id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2347,10 +5118,8 @@ def get_user_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_user_serialize( + _param = self._list_instances_serialize( project_id=project_id, - instance_id=instance_id, - user_id=user_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2358,10 +5127,9 @@ def get_user_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "User", + "200": "ListInstancesResponse", "400": "BadRequest", "401": "str", - "404": "NotFound", "500": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -2372,13 +5140,11 @@ def get_user_with_http_info( ) @validate_call - def get_user_without_preload_content( + def list_instances_without_preload_content( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") ], - instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], - user_id: Annotated[UUID, Field(description="The user UUID with permissions on the Secrets Manager instance.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2389,16 +5155,12 @@ def get_user_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_user + """list_instances - Returns the details for the given user. + Returns a list of all Secrets Manager instances within the project. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID - :param instance_id: The Secrets Manager instance UUID. (required) - :type instance_id: UUID - :param user_id: The user UUID with permissions on the Secrets Manager instance. (required) - :type user_id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2421,10 +5183,8 @@ def get_user_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_user_serialize( + _param = self._list_instances_serialize( project_id=project_id, - instance_id=instance_id, - user_id=user_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2432,20 +5192,17 @@ def get_user_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "User", + "200": "ListInstancesResponse", "400": "BadRequest", "401": "str", - "404": "NotFound", "500": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_user_serialize( + def _list_instances_serialize( self, project_id, - instance_id, - user_id, _request_auth, _content_type, _headers, @@ -2466,10 +5223,6 @@ def _get_user_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if instance_id is not None: - _path_params["instanceId"] = instance_id - if user_id is not None: - _path_params["userId"] = user_id # process the query parameters # process the header parameters # process the form parameters @@ -2484,7 +5237,7 @@ def _get_user_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/users/{userId}", + resource_path="/v1/projects/{projectId}/instances", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2498,7 +5251,7 @@ def _get_user_serialize( ) @validate_call - def list_acls( + def list_users( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") @@ -2513,10 +5266,10 @@ def list_acls( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ListACLsResponse: - """list_acls + ) -> ListUsersResponse: + """list_users - Returns the acls for the given Secrets Manager instance. + Returns the users for the given Secrets Manager instance. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID @@ -2544,7 +5297,7 @@ def list_acls( :return: Returns the result object. """ # noqa: E501 - _param = self._list_acls_serialize( + _param = self._list_users_serialize( project_id=project_id, instance_id=instance_id, _request_auth=_request_auth, @@ -2554,7 +5307,7 @@ def list_acls( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListACLsResponse", + "200": "ListUsersResponse", "400": "BadRequest", "401": "str", "404": "NotFound", @@ -2568,7 +5321,7 @@ def list_acls( ).data @validate_call - def list_acls_with_http_info( + def list_users_with_http_info( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") @@ -2583,10 +5336,10 @@ def list_acls_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ListACLsResponse]: - """list_acls + ) -> ApiResponse[ListUsersResponse]: + """list_users - Returns the acls for the given Secrets Manager instance. + Returns the users for the given Secrets Manager instance. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID @@ -2614,7 +5367,7 @@ def list_acls_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_acls_serialize( + _param = self._list_users_serialize( project_id=project_id, instance_id=instance_id, _request_auth=_request_auth, @@ -2624,7 +5377,7 @@ def list_acls_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListACLsResponse", + "200": "ListUsersResponse", "400": "BadRequest", "401": "str", "404": "NotFound", @@ -2638,7 +5391,7 @@ def list_acls_with_http_info( ) @validate_call - def list_acls_without_preload_content( + def list_users_without_preload_content( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") @@ -2654,9 +5407,9 @@ def list_acls_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """list_acls + """list_users - Returns the acls for the given Secrets Manager instance. + Returns the users for the given Secrets Manager instance. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID @@ -2684,7 +5437,7 @@ def list_acls_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_acls_serialize( + _param = self._list_users_serialize( project_id=project_id, instance_id=instance_id, _request_auth=_request_auth, @@ -2694,7 +5447,7 @@ def list_acls_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListACLsResponse", + "200": "ListUsersResponse", "400": "BadRequest", "401": "str", "404": "NotFound", @@ -2703,7 +5456,7 @@ def list_acls_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_acls_serialize( + def _list_users_serialize( self, project_id, instance_id, @@ -2743,7 +5496,7 @@ def _list_acls_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/acls", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/users", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2757,11 +5510,14 @@ def _list_acls_serialize( ) @validate_call - def list_instances( + def update_acl( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") ], + instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + acl_id: Annotated[UUID, Field(description="The acl UUID of the Secrets Manager instance.")], + update_acl_payload: UpdateACLPayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2771,13 +5527,19 @@ def list_instances( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ListInstancesResponse: - """list_instances + ) -> None: + """update_acl - Returns a list of all Secrets Manager instances within the project. + Updates the ip ranges for the acl. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID + :param instance_id: The Secrets Manager instance UUID. (required) + :type instance_id: UUID + :param acl_id: The acl UUID of the Secrets Manager instance. (required) + :type acl_id: UUID + :param update_acl_payload: (required) + :type update_acl_payload: UpdateACLPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2800,8 +5562,11 @@ def list_instances( :return: Returns the result object. """ # noqa: E501 - _param = self._list_instances_serialize( + _param = self._update_acl_serialize( project_id=project_id, + instance_id=instance_id, + acl_id=acl_id, + update_acl_payload=update_acl_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2809,9 +5574,10 @@ def list_instances( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListInstancesResponse", + "200": None, "400": "BadRequest", "401": "str", + "404": "NotFound", "500": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -2822,11 +5588,14 @@ def list_instances( ).data @validate_call - def list_instances_with_http_info( + def update_acl_with_http_info( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") ], + instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + acl_id: Annotated[UUID, Field(description="The acl UUID of the Secrets Manager instance.")], + update_acl_payload: UpdateACLPayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2836,13 +5605,19 @@ def list_instances_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ListInstancesResponse]: - """list_instances + ) -> ApiResponse[None]: + """update_acl - Returns a list of all Secrets Manager instances within the project. + Updates the ip ranges for the acl. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID + :param instance_id: The Secrets Manager instance UUID. (required) + :type instance_id: UUID + :param acl_id: The acl UUID of the Secrets Manager instance. (required) + :type acl_id: UUID + :param update_acl_payload: (required) + :type update_acl_payload: UpdateACLPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2865,8 +5640,11 @@ def list_instances_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_instances_serialize( + _param = self._update_acl_serialize( project_id=project_id, + instance_id=instance_id, + acl_id=acl_id, + update_acl_payload=update_acl_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2874,9 +5652,10 @@ def list_instances_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListInstancesResponse", + "200": None, "400": "BadRequest", "401": "str", + "404": "NotFound", "500": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -2887,11 +5666,14 @@ def list_instances_with_http_info( ) @validate_call - def list_instances_without_preload_content( + def update_acl_without_preload_content( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") ], + instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + acl_id: Annotated[UUID, Field(description="The acl UUID of the Secrets Manager instance.")], + update_acl_payload: UpdateACLPayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2902,12 +5684,18 @@ def list_instances_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """list_instances + """update_acl - Returns a list of all Secrets Manager instances within the project. + Updates the ip ranges for the acl. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID + :param instance_id: The Secrets Manager instance UUID. (required) + :type instance_id: UUID + :param acl_id: The acl UUID of the Secrets Manager instance. (required) + :type acl_id: UUID + :param update_acl_payload: (required) + :type update_acl_payload: UpdateACLPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2930,8 +5718,11 @@ def list_instances_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_instances_serialize( + _param = self._update_acl_serialize( project_id=project_id, + instance_id=instance_id, + acl_id=acl_id, + update_acl_payload=update_acl_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2939,17 +5730,21 @@ def list_instances_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListInstancesResponse", + "200": None, "400": "BadRequest", "401": "str", + "404": "NotFound", "500": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_instances_serialize( + def _update_acl_serialize( self, project_id, + instance_id, + acl_id, + update_acl_payload, _request_auth, _content_type, _headers, @@ -2970,21 +5765,35 @@ def _list_instances_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id + if instance_id is not None: + _path_params["instanceId"] = instance_id + if acl_id is not None: + _path_params["aclId"] = acl_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if update_acl_payload is not None: + _body_params = update_acl_payload # set the HTTP header `Accept` if "Accept" not in _header_params: _header_params["Accept"] = self.api_client.select_header_accept(["application/json", "text/plain"]) + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + # authentication setting _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/projects/{projectId}/instances", + method="PUT", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/acls/{aclId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2998,12 +5807,13 @@ def _list_instances_serialize( ) @validate_call - def list_users( + def update_acls( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") ], instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + update_acls_payload: UpdateACLsPayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3013,15 +5823,17 @@ def list_users( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ListUsersResponse: - """list_users + ) -> None: + """update_acls - Returns the users for the given Secrets Manager instance. + Changes a list of ACLs within the project. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID :param instance_id: The Secrets Manager instance UUID. (required) :type instance_id: UUID + :param update_acls_payload: (required) + :type update_acls_payload: UpdateACLsPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3044,9 +5856,10 @@ def list_users( :return: Returns the result object. """ # noqa: E501 - _param = self._list_users_serialize( + _param = self._update_acls_serialize( project_id=project_id, instance_id=instance_id, + update_acls_payload=update_acls_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3054,10 +5867,11 @@ def list_users( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListUsersResponse", + "200": None, "400": "BadRequest", "401": "str", "404": "NotFound", + "409": "Conflict", "500": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -3068,12 +5882,13 @@ def list_users( ).data @validate_call - def list_users_with_http_info( + def update_acls_with_http_info( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") ], instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + update_acls_payload: UpdateACLsPayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3083,15 +5898,17 @@ def list_users_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ListUsersResponse]: - """list_users + ) -> ApiResponse[None]: + """update_acls - Returns the users for the given Secrets Manager instance. + Changes a list of ACLs within the project. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID :param instance_id: The Secrets Manager instance UUID. (required) :type instance_id: UUID + :param update_acls_payload: (required) + :type update_acls_payload: UpdateACLsPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3114,9 +5931,10 @@ def list_users_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_users_serialize( + _param = self._update_acls_serialize( project_id=project_id, instance_id=instance_id, + update_acls_payload=update_acls_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3124,10 +5942,11 @@ def list_users_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListUsersResponse", + "200": None, "400": "BadRequest", "401": "str", "404": "NotFound", + "409": "Conflict", "500": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -3138,12 +5957,13 @@ def list_users_with_http_info( ) @validate_call - def list_users_without_preload_content( + def update_acls_without_preload_content( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") ], instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], + update_acls_payload: UpdateACLsPayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3154,14 +5974,16 @@ def list_users_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """list_users + """update_acls - Returns the users for the given Secrets Manager instance. + Changes a list of ACLs within the project. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID :param instance_id: The Secrets Manager instance UUID. (required) :type instance_id: UUID + :param update_acls_payload: (required) + :type update_acls_payload: UpdateACLsPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3184,9 +6006,10 @@ def list_users_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_users_serialize( + _param = self._update_acls_serialize( project_id=project_id, instance_id=instance_id, + update_acls_payload=update_acls_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3194,19 +6017,21 @@ def list_users_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListUsersResponse", + "200": None, "400": "BadRequest", "401": "str", "404": "NotFound", + "409": "Conflict", "500": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_users_serialize( + def _update_acls_serialize( self, project_id, instance_id, + update_acls_payload, _request_auth, _content_type, _headers, @@ -3233,17 +6058,27 @@ def _list_users_serialize( # process the header parameters # process the form parameters # process the body parameter + if update_acls_payload is not None: + _body_params = update_acls_payload # set the HTTP header `Accept` if "Accept" not in _header_params: _header_params["Accept"] = self.api_client.select_header_accept(["application/json", "text/plain"]) + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + # authentication setting _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/users", + method="PUT", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/acls", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3257,14 +6092,14 @@ def _list_users_serialize( ) @validate_call - def update_acl( + def update_approle( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") ], instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], - acl_id: Annotated[UUID, Field(description="The acl UUID of the Secrets Manager instance.")], - update_acl_payload: UpdateACLPayload, + role_id: Annotated[UUID, Field(description="The approle with permissions on the Secrets Manager instance.")], + update_approle_payload: UpdateApprolePayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3274,19 +6109,19 @@ def update_acl( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """update_acl + ) -> Approle: + """update_approle - Updates the ip ranges for the acl. + Updates the details for the given approle. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID :param instance_id: The Secrets Manager instance UUID. (required) :type instance_id: UUID - :param acl_id: The acl UUID of the Secrets Manager instance. (required) - :type acl_id: UUID - :param update_acl_payload: (required) - :type update_acl_payload: UpdateACLPayload + :param role_id: The approle with permissions on the Secrets Manager instance. (required) + :type role_id: UUID + :param update_approle_payload: (required) + :type update_approle_payload: UpdateApprolePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3309,11 +6144,11 @@ def update_acl( :return: Returns the result object. """ # noqa: E501 - _param = self._update_acl_serialize( + _param = self._update_approle_serialize( project_id=project_id, instance_id=instance_id, - acl_id=acl_id, - update_acl_payload=update_acl_payload, + role_id=role_id, + update_approle_payload=update_approle_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3321,7 +6156,7 @@ def update_acl( ) _response_types_map: Dict[str, Optional[str]] = { - "200": None, + "200": "Approle", "400": "BadRequest", "401": "str", "404": "NotFound", @@ -3335,14 +6170,14 @@ def update_acl( ).data @validate_call - def update_acl_with_http_info( + def update_approle_with_http_info( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") ], instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], - acl_id: Annotated[UUID, Field(description="The acl UUID of the Secrets Manager instance.")], - update_acl_payload: UpdateACLPayload, + role_id: Annotated[UUID, Field(description="The approle with permissions on the Secrets Manager instance.")], + update_approle_payload: UpdateApprolePayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3352,19 +6187,19 @@ def update_acl_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """update_acl + ) -> ApiResponse[Approle]: + """update_approle - Updates the ip ranges for the acl. + Updates the details for the given approle. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID :param instance_id: The Secrets Manager instance UUID. (required) :type instance_id: UUID - :param acl_id: The acl UUID of the Secrets Manager instance. (required) - :type acl_id: UUID - :param update_acl_payload: (required) - :type update_acl_payload: UpdateACLPayload + :param role_id: The approle with permissions on the Secrets Manager instance. (required) + :type role_id: UUID + :param update_approle_payload: (required) + :type update_approle_payload: UpdateApprolePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3387,11 +6222,11 @@ def update_acl_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._update_acl_serialize( + _param = self._update_approle_serialize( project_id=project_id, instance_id=instance_id, - acl_id=acl_id, - update_acl_payload=update_acl_payload, + role_id=role_id, + update_approle_payload=update_approle_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3399,7 +6234,7 @@ def update_acl_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": None, + "200": "Approle", "400": "BadRequest", "401": "str", "404": "NotFound", @@ -3413,14 +6248,14 @@ def update_acl_with_http_info( ) @validate_call - def update_acl_without_preload_content( + def update_approle_without_preload_content( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") ], instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], - acl_id: Annotated[UUID, Field(description="The acl UUID of the Secrets Manager instance.")], - update_acl_payload: UpdateACLPayload, + role_id: Annotated[UUID, Field(description="The approle with permissions on the Secrets Manager instance.")], + update_approle_payload: UpdateApprolePayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3431,18 +6266,18 @@ def update_acl_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """update_acl + """update_approle - Updates the ip ranges for the acl. + Updates the details for the given approle. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID :param instance_id: The Secrets Manager instance UUID. (required) :type instance_id: UUID - :param acl_id: The acl UUID of the Secrets Manager instance. (required) - :type acl_id: UUID - :param update_acl_payload: (required) - :type update_acl_payload: UpdateACLPayload + :param role_id: The approle with permissions on the Secrets Manager instance. (required) + :type role_id: UUID + :param update_approle_payload: (required) + :type update_approle_payload: UpdateApprolePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3465,11 +6300,11 @@ def update_acl_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._update_acl_serialize( + _param = self._update_approle_serialize( project_id=project_id, instance_id=instance_id, - acl_id=acl_id, - update_acl_payload=update_acl_payload, + role_id=role_id, + update_approle_payload=update_approle_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3477,7 +6312,7 @@ def update_acl_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": None, + "200": "Approle", "400": "BadRequest", "401": "str", "404": "NotFound", @@ -3486,12 +6321,12 @@ def update_acl_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_acl_serialize( + def _update_approle_serialize( self, project_id, instance_id, - acl_id, - update_acl_payload, + role_id, + update_approle_payload, _request_auth, _content_type, _headers, @@ -3514,14 +6349,14 @@ def _update_acl_serialize( _path_params["projectId"] = project_id if instance_id is not None: _path_params["instanceId"] = instance_id - if acl_id is not None: - _path_params["aclId"] = acl_id + if role_id is not None: + _path_params["roleId"] = role_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if update_acl_payload is not None: - _body_params = update_acl_payload + if update_approle_payload is not None: + _body_params = update_approle_payload # set the HTTP header `Accept` if "Accept" not in _header_params: @@ -3540,7 +6375,7 @@ def _update_acl_serialize( return self.api_client.param_serialize( method="PUT", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/acls/{aclId}", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/approles/{roleId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3554,13 +6389,15 @@ def _update_acl_serialize( ) @validate_call - def update_acls( + def update_approle_secret_id( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") ], instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], - update_acls_payload: UpdateACLsPayload, + role_id: Annotated[UUID, Field(description="The approle with permissions on the Secrets Manager instance.")], + secret_id_version: Annotated[StrictInt, Field(description="The version of the secret id.")], + update_approle_secret_id_payload: UpdateApproleSecretIdPayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3570,17 +6407,21 @@ def update_acls( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """update_acls + ) -> ApproleSecret: + """update_approle_secret_id - Changes a list of ACLs within the project. + Update the description of a secret id by its given version. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID :param instance_id: The Secrets Manager instance UUID. (required) :type instance_id: UUID - :param update_acls_payload: (required) - :type update_acls_payload: UpdateACLsPayload + :param role_id: The approle with permissions on the Secrets Manager instance. (required) + :type role_id: UUID + :param secret_id_version: The version of the secret id. (required) + :type secret_id_version: int + :param update_approle_secret_id_payload: (required) + :type update_approle_secret_id_payload: UpdateApproleSecretIdPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3603,10 +6444,12 @@ def update_acls( :return: Returns the result object. """ # noqa: E501 - _param = self._update_acls_serialize( + _param = self._update_approle_secret_id_serialize( project_id=project_id, instance_id=instance_id, - update_acls_payload=update_acls_payload, + role_id=role_id, + secret_id_version=secret_id_version, + update_approle_secret_id_payload=update_approle_secret_id_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3614,11 +6457,10 @@ def update_acls( ) _response_types_map: Dict[str, Optional[str]] = { - "200": None, + "200": "ApproleSecret", "400": "BadRequest", "401": "str", "404": "NotFound", - "409": "Conflict", "500": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -3629,13 +6471,15 @@ def update_acls( ).data @validate_call - def update_acls_with_http_info( + def update_approle_secret_id_with_http_info( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") ], instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], - update_acls_payload: UpdateACLsPayload, + role_id: Annotated[UUID, Field(description="The approle with permissions on the Secrets Manager instance.")], + secret_id_version: Annotated[StrictInt, Field(description="The version of the secret id.")], + update_approle_secret_id_payload: UpdateApproleSecretIdPayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3645,17 +6489,21 @@ def update_acls_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """update_acls + ) -> ApiResponse[ApproleSecret]: + """update_approle_secret_id - Changes a list of ACLs within the project. + Update the description of a secret id by its given version. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID :param instance_id: The Secrets Manager instance UUID. (required) :type instance_id: UUID - :param update_acls_payload: (required) - :type update_acls_payload: UpdateACLsPayload + :param role_id: The approle with permissions on the Secrets Manager instance. (required) + :type role_id: UUID + :param secret_id_version: The version of the secret id. (required) + :type secret_id_version: int + :param update_approle_secret_id_payload: (required) + :type update_approle_secret_id_payload: UpdateApproleSecretIdPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3678,10 +6526,12 @@ def update_acls_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._update_acls_serialize( + _param = self._update_approle_secret_id_serialize( project_id=project_id, instance_id=instance_id, - update_acls_payload=update_acls_payload, + role_id=role_id, + secret_id_version=secret_id_version, + update_approle_secret_id_payload=update_approle_secret_id_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3689,11 +6539,10 @@ def update_acls_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": None, + "200": "ApproleSecret", "400": "BadRequest", "401": "str", "404": "NotFound", - "409": "Conflict", "500": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -3704,13 +6553,15 @@ def update_acls_with_http_info( ) @validate_call - def update_acls_without_preload_content( + def update_approle_secret_id_without_preload_content( self, project_id: Annotated[ UUID, Field(description="The STACKIT portal project UUID the Secrets Manager instance is part of.") ], instance_id: Annotated[UUID, Field(description="The Secrets Manager instance UUID.")], - update_acls_payload: UpdateACLsPayload, + role_id: Annotated[UUID, Field(description="The approle with permissions on the Secrets Manager instance.")], + secret_id_version: Annotated[StrictInt, Field(description="The version of the secret id.")], + update_approle_secret_id_payload: UpdateApproleSecretIdPayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3721,16 +6572,20 @@ def update_acls_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """update_acls + """update_approle_secret_id - Changes a list of ACLs within the project. + Update the description of a secret id by its given version. :param project_id: The STACKIT portal project UUID the Secrets Manager instance is part of. (required) :type project_id: UUID :param instance_id: The Secrets Manager instance UUID. (required) :type instance_id: UUID - :param update_acls_payload: (required) - :type update_acls_payload: UpdateACLsPayload + :param role_id: The approle with permissions on the Secrets Manager instance. (required) + :type role_id: UUID + :param secret_id_version: The version of the secret id. (required) + :type secret_id_version: int + :param update_approle_secret_id_payload: (required) + :type update_approle_secret_id_payload: UpdateApproleSecretIdPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3753,10 +6608,12 @@ def update_acls_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._update_acls_serialize( + _param = self._update_approle_secret_id_serialize( project_id=project_id, instance_id=instance_id, - update_acls_payload=update_acls_payload, + role_id=role_id, + secret_id_version=secret_id_version, + update_approle_secret_id_payload=update_approle_secret_id_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3764,21 +6621,22 @@ def update_acls_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": None, + "200": "ApproleSecret", "400": "BadRequest", "401": "str", "404": "NotFound", - "409": "Conflict", "500": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_acls_serialize( + def _update_approle_secret_id_serialize( self, project_id, instance_id, - update_acls_payload, + role_id, + secret_id_version, + update_approle_secret_id_payload, _request_auth, _content_type, _headers, @@ -3801,12 +6659,16 @@ def _update_acls_serialize( _path_params["projectId"] = project_id if instance_id is not None: _path_params["instanceId"] = instance_id + if role_id is not None: + _path_params["roleId"] = role_id + if secret_id_version is not None: + _path_params["secretIdVersion"] = secret_id_version # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if update_acls_payload is not None: - _body_params = update_acls_payload + if update_approle_secret_id_payload is not None: + _body_params = update_approle_secret_id_payload # set the HTTP header `Accept` if "Accept" not in _header_params: @@ -3825,7 +6687,7 @@ def _update_acls_serialize( return self.api_client.param_serialize( method="PUT", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/acls", + resource_path="/v1/projects/{projectId}/instances/{instanceId}/approles/{roleId}/secretids/{secretIdVersion}", path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/services/secretsmanager/src/stackit/secretsmanager/models/__init__.py b/services/secretsmanager/src/stackit/secretsmanager/models/__init__.py index c832a3552..0a0923319 100644 --- a/services/secretsmanager/src/stackit/secretsmanager/models/__init__.py +++ b/services/secretsmanager/src/stackit/secretsmanager/models/__init__.py @@ -14,9 +14,17 @@ # import models into model package from stackit.secretsmanager.models.acl import ACL +from stackit.secretsmanager.models.approle import Approle +from stackit.secretsmanager.models.approle_list import ApproleList +from stackit.secretsmanager.models.approle_secret import ApproleSecret +from stackit.secretsmanager.models.approle_secret_list import ApproleSecretList from stackit.secretsmanager.models.bad_request import BadRequest from stackit.secretsmanager.models.conflict import Conflict from stackit.secretsmanager.models.create_acl_payload import CreateACLPayload +from stackit.secretsmanager.models.create_approle_payload import CreateApprolePayload +from stackit.secretsmanager.models.create_approle_secret_id_payload import ( + CreateApproleSecretIdPayload, +) from stackit.secretsmanager.models.create_instance_payload import CreateInstancePayload from stackit.secretsmanager.models.create_user_payload import CreateUserPayload from stackit.secretsmanager.models.instance import Instance @@ -27,6 +35,10 @@ from stackit.secretsmanager.models.not_found import NotFound from stackit.secretsmanager.models.update_acl_payload import UpdateACLPayload from stackit.secretsmanager.models.update_acls_payload import UpdateACLsPayload +from stackit.secretsmanager.models.update_approle_payload import UpdateApprolePayload +from stackit.secretsmanager.models.update_approle_secret_id_payload import ( + UpdateApproleSecretIdPayload, +) from stackit.secretsmanager.models.update_instance_payload import UpdateInstancePayload from stackit.secretsmanager.models.update_user_payload import UpdateUserPayload from stackit.secretsmanager.models.user import User diff --git a/services/secretsmanager/src/stackit/secretsmanager/models/approle.py b/services/secretsmanager/src/stackit/secretsmanager/models/approle.py new file mode 100644 index 000000000..48ab8f4e7 --- /dev/null +++ b/services/secretsmanager/src/stackit/secretsmanager/models/approle.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" +STACKIT Secrets Manager API + +This API provides endpoints for managing the Secrets-Manager. + +The version of the OpenAPI document: 1.4.3 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set +from uuid import UUID + +from pydantic import ( + BaseModel, + ConfigDict, + Field, + StrictBool, + StrictInt, + StrictStr, + field_validator, +) +from pydantic_core import to_jsonable_python +from typing_extensions import Annotated, Self + + +class Approle(BaseModel): + """ + Approle + """ # noqa: E501 + + description: StrictStr = Field(description="A user chosen description to differentiate between multiple approles.") + role_id: UUID = Field(description="Identifier used for authentication") + secret_id_num_uses: StrictInt + secret_id_ttl: Annotated[str, Field(strict=True)] = Field( + description="Token TTL in time.Duration format (eg 15m for 15 minutes, 1h for 1 hour)." + ) + write: StrictBool = Field( + description="Is true if the approle has write access to the secrets engine. Is false for a read-only approle." + ) + __properties: ClassVar[List[str]] = ["description", "role_id", "secret_id_num_uses", "secret_id_ttl", "write"] + + @field_validator("secret_id_ttl") + def secret_id_ttl_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not isinstance(value, str): + value = str(value) + + if not re.match(r"^[0-9]+[smh]$", value): + raise ValueError(r"must validate the regular expression /^[0-9]+[smh]$/") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Approle from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Approle from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "description": obj.get("description"), + "role_id": obj.get("role_id"), + "secret_id_num_uses": obj.get("secret_id_num_uses"), + "secret_id_ttl": obj.get("secret_id_ttl"), + "write": obj.get("write"), + } + ) + return _obj diff --git a/services/secretsmanager/src/stackit/secretsmanager/models/approle_list.py b/services/secretsmanager/src/stackit/secretsmanager/models/approle_list.py new file mode 100644 index 000000000..035a3107d --- /dev/null +++ b/services/secretsmanager/src/stackit/secretsmanager/models/approle_list.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" +STACKIT Secrets Manager API + +This API provides endpoints for managing the Secrets-Manager. + +The version of the OpenAPI document: 1.4.3 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict +from pydantic_core import to_jsonable_python +from typing_extensions import Self + +from stackit.secretsmanager.models.approle import Approle + + +class ApproleList(BaseModel): + """ + ApproleList + """ # noqa: E501 + + approles: List[Approle] + __properties: ClassVar[List[str]] = ["approles"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApproleList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in approles (list) + _items = [] + if self.approles: + for _item_approles in self.approles: + if _item_approles: + _items.append(_item_approles.to_dict()) + _dict["approles"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApproleList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "approles": ( + [Approle.from_dict(_item) for _item in obj["approles"]] if obj.get("approles") is not None else None + ) + } + ) + return _obj diff --git a/services/secretsmanager/src/stackit/secretsmanager/models/approle_secret.py b/services/secretsmanager/src/stackit/secretsmanager/models/approle_secret.py new file mode 100644 index 000000000..806d00327 --- /dev/null +++ b/services/secretsmanager/src/stackit/secretsmanager/models/approle_secret.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" +STACKIT Secrets Manager API + +This API provides endpoints for managing the Secrets-Manager. + +The version of the OpenAPI document: 1.4.3 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set +from uuid import UUID + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from pydantic_core import to_jsonable_python +from typing_extensions import Annotated, Self + + +class ApproleSecret(BaseModel): + """ + ApproleSecret + """ # noqa: E501 + + description: StrictStr = Field( + description="A user chosen description to differentiate between multiple approle secrets." + ) + num_uses: StrictInt + secret_id: Optional[UUID] = Field( + default=None, description="Identifier used for authentication, returned only at creation" + ) + ttl: Annotated[str, Field(strict=True)] = Field( + description="Token TTL in time.Duration format (eg 15m for 15 minutes, 1h for 1 hour)." + ) + version: StrictInt = Field(description="Accessor used for handling secrets") + __properties: ClassVar[List[str]] = ["description", "num_uses", "secret_id", "ttl", "version"] + + @field_validator("ttl") + def ttl_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not isinstance(value, str): + value = str(value) + + if not re.match(r"^[0-9]+[smh]$", value): + raise ValueError(r"must validate the regular expression /^[0-9]+[smh]$/") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApproleSecret from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApproleSecret from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "description": obj.get("description"), + "num_uses": obj.get("num_uses"), + "secret_id": obj.get("secret_id"), + "ttl": obj.get("ttl"), + "version": obj.get("version"), + } + ) + return _obj diff --git a/services/secretsmanager/src/stackit/secretsmanager/models/approle_secret_list.py b/services/secretsmanager/src/stackit/secretsmanager/models/approle_secret_list.py new file mode 100644 index 000000000..0bc070e0f --- /dev/null +++ b/services/secretsmanager/src/stackit/secretsmanager/models/approle_secret_list.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" +STACKIT Secrets Manager API + +This API provides endpoints for managing the Secrets-Manager. + +The version of the OpenAPI document: 1.4.3 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field +from pydantic_core import to_jsonable_python +from typing_extensions import Self + +from stackit.secretsmanager.models.approle_secret import ApproleSecret + + +class ApproleSecretList(BaseModel): + """ + ApproleSecretList + """ # noqa: E501 + + secret_ids: List[ApproleSecret] = Field(alias="secretIds") + __properties: ClassVar[List[str]] = ["secretIds"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApproleSecretList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in secret_ids (list) + _items = [] + if self.secret_ids: + for _item_secret_ids in self.secret_ids: + if _item_secret_ids: + _items.append(_item_secret_ids.to_dict()) + _dict["secretIds"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApproleSecretList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "secretIds": ( + [ApproleSecret.from_dict(_item) for _item in obj["secretIds"]] + if obj.get("secretIds") is not None + else None + ) + } + ) + return _obj diff --git a/services/secretsmanager/src/stackit/secretsmanager/models/create_approle_payload.py b/services/secretsmanager/src/stackit/secretsmanager/models/create_approle_payload.py new file mode 100644 index 000000000..704346785 --- /dev/null +++ b/services/secretsmanager/src/stackit/secretsmanager/models/create_approle_payload.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" +STACKIT Secrets Manager API + +This API provides endpoints for managing the Secrets-Manager. + +The version of the OpenAPI document: 1.4.3 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import ( + BaseModel, + ConfigDict, + Field, + StrictBool, + StrictInt, + StrictStr, + field_validator, +) +from pydantic_core import to_jsonable_python +from typing_extensions import Annotated, Self + + +class CreateApprolePayload(BaseModel): + """ + CreateApprolePayload + """ # noqa: E501 + + description: Optional[StrictStr] = Field( + default="", description="A user chosen description to differentiate between multiple approles." + ) + secret_id_num_uses: Optional[StrictInt] = 0 + secret_id_ttl: Optional[Annotated[str, Field(strict=True)]] = Field( + default="0s", description="Token TTL in time.Duration format (eg 15m for 15 minutes, 1h for 1 hour)." + ) + write: Optional[StrictBool] = Field( + default=False, + description="Is true if the approle has write access to the secrets engine. Is false for a read-only approle.", + ) + __properties: ClassVar[List[str]] = ["description", "secret_id_num_uses", "secret_id_ttl", "write"] + + @field_validator("secret_id_ttl") + def secret_id_ttl_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + + if not re.match(r"^[0-9]+[smh]$", value): + raise ValueError(r"must validate the regular expression /^[0-9]+[smh]$/") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateApprolePayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateApprolePayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "description": obj.get("description") if obj.get("description") is not None else "", + "secret_id_num_uses": obj.get("secret_id_num_uses") if obj.get("secret_id_num_uses") is not None else 0, + "secret_id_ttl": obj.get("secret_id_ttl") if obj.get("secret_id_ttl") is not None else "0s", + "write": obj.get("write") if obj.get("write") is not None else False, + } + ) + return _obj diff --git a/services/secretsmanager/src/stackit/secretsmanager/models/create_approle_secret_id_payload.py b/services/secretsmanager/src/stackit/secretsmanager/models/create_approle_secret_id_payload.py new file mode 100644 index 000000000..d8d49a9fc --- /dev/null +++ b/services/secretsmanager/src/stackit/secretsmanager/models/create_approle_secret_id_payload.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" +STACKIT Secrets Manager API + +This API provides endpoints for managing the Secrets-Manager. + +The version of the OpenAPI document: 1.4.3 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic_core import to_jsonable_python +from typing_extensions import Self + + +class CreateApproleSecretIdPayload(BaseModel): + """ + CreateApproleSecretIdPayload + """ # noqa: E501 + + description: Optional[StrictStr] = Field( + default="", description="A user chosen description to differentiate between multiple approle secrets." + ) + __properties: ClassVar[List[str]] = ["description"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateApproleSecretIdPayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateApproleSecretIdPayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"description": obj.get("description") if obj.get("description") is not None else ""}) + return _obj diff --git a/services/secretsmanager/src/stackit/secretsmanager/models/update_approle_payload.py b/services/secretsmanager/src/stackit/secretsmanager/models/update_approle_payload.py new file mode 100644 index 000000000..1e4fb968e --- /dev/null +++ b/services/secretsmanager/src/stackit/secretsmanager/models/update_approle_payload.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" +STACKIT Secrets Manager API + +This API provides endpoints for managing the Secrets-Manager. + +The version of the OpenAPI document: 1.4.3 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import ( + BaseModel, + ConfigDict, + Field, + StrictBool, + StrictInt, + StrictStr, + field_validator, +) +from pydantic_core import to_jsonable_python +from typing_extensions import Annotated, Self + + +class UpdateApprolePayload(BaseModel): + """ + UpdateApprolePayload + """ # noqa: E501 + + description: Optional[StrictStr] = Field( + default=None, description="A user chosen description to differentiate between multiple approles." + ) + secret_id_num_uses: Optional[StrictInt] = None + secret_id_ttl: Optional[Annotated[str, Field(strict=True)]] = Field( + default=None, description="Token TTL in time.Duration format (eg 15m for 15 minutes, 1h for 1 hour)." + ) + write: Optional[StrictBool] = Field( + default=None, + description="Is true if the approle has write access to the secrets engine. Is false for a read-only approle.", + ) + __properties: ClassVar[List[str]] = ["description", "secret_id_num_uses", "secret_id_ttl", "write"] + + @field_validator("secret_id_ttl") + def secret_id_ttl_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + + if not re.match(r"^[0-9]+[smh]$", value): + raise ValueError(r"must validate the regular expression /^[0-9]+[smh]$/") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateApprolePayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateApprolePayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "description": obj.get("description"), + "secret_id_num_uses": obj.get("secret_id_num_uses"), + "secret_id_ttl": obj.get("secret_id_ttl"), + "write": obj.get("write"), + } + ) + return _obj diff --git a/services/secretsmanager/src/stackit/secretsmanager/models/update_approle_secret_id_payload.py b/services/secretsmanager/src/stackit/secretsmanager/models/update_approle_secret_id_payload.py new file mode 100644 index 000000000..b5110a873 --- /dev/null +++ b/services/secretsmanager/src/stackit/secretsmanager/models/update_approle_secret_id_payload.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" +STACKIT Secrets Manager API + +This API provides endpoints for managing the Secrets-Manager. + +The version of the OpenAPI document: 1.4.3 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic_core import to_jsonable_python +from typing_extensions import Self + + +class UpdateApproleSecretIdPayload(BaseModel): + """ + UpdateApproleSecretIdPayload + """ # noqa: E501 + + description: Optional[StrictStr] = Field( + default="", description="A user chosen description to differentiate between multiple approle secrets." + ) + __properties: ClassVar[List[str]] = ["description"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateApproleSecretIdPayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateApproleSecretIdPayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"description": obj.get("description") if obj.get("description") is not None else ""}) + return _obj