register_admin(
space_id: SpaceId,
admin_id: AdminId,
*,
config_overrides: Optional[repostspaceClientConfig] = None,
) -> None
Adds a user or group to the list of administrators of the private re:Post.
Parameters:
-
space_id
(SpaceId)
–
The ID of the private re:Post.
-
admin_id
(AdminId)
–
The ID of the administrator.
Raises:
Source code in docs_src/capo_repostspace/_services/repostspace.py
| def register_admin(
self,
space_id: "capo_repostspace.types.space_id.SpaceId",
admin_id: "capo_repostspace.types.admin_id.AdminId",
*,
config_overrides: Optional[repostspaceClientConfig] = None,
) -> None:
"""<p>Adds a user or group to the list of administrators of the private re:Post.</p>
Args:
space_id: <p>The ID of the private re:Post.</p>
admin_id: <p>The ID of the administrator.</p>
Raises:
capo_repostspace.errors.access_denied_exception.AccessDeniedException: <p>User does not have sufficient access to perform this action.</p>
capo_repostspace.errors.internal_server_exception.InternalServerException: <p>Unexpected error during processing of request.</p>
capo_repostspace.errors.resource_not_found_exception.ResourceNotFoundException: <p>Request references a resource which does not exist.</p>
capo_repostspace.errors.throttling_exception.ThrottlingException: <p>Request was denied due to request throttling.</p>
capo_repostspace.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an AWS service.</p>
capo_repostspace.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_repostspace.types.register_admin_input.RegisterAdminInput]",
) -> OperationResponse[None]:
import capo_repostspace._operations.repost_space.register_admin
output, http_response = (
capo_repostspace._operations.repost_space.register_admin.register_admin(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("RegisterAdmin")
)
input_: capo_repostspace.types.register_admin_input.RegisterAdminInput = {
"space_id": space_id,
"admin_id": admin_id,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|