Add a role to multiple users or groups in a private re:Post.
Parameters:
-
space_id
(SpaceId)
–
The unique ID of the private re:Post.
-
accessor_ids
(AccessorIdList)
–
The user or group accessor identifiers to add the role to.
-
role
(Role)
–
The role to add to the users or groups.
Raises:
Examples:
BatchAddRole
>>> client.batch_add_role(space_id='SP1234567890abcdefghijkl', accessor_ids=['12345678-1234-1234-1234-1234567890ab'], role='EXPERT')
Source code in docs_src/capo_repostspace/_services/repostspace.py
| def batch_add_role(
self,
space_id: "capo_repostspace.types.space_id.SpaceId",
accessor_ids: "capo_repostspace.types.accessor_id_list.AccessorIdList",
role: "capo_repostspace.types.role.Role",
*,
config_overrides: Optional[repostspaceClientConfig] = None,
) -> "capo_repostspace.types.batch_add_role_output.BatchAddRoleOutput":
"""<p>Add a role to multiple users or groups in a private re:Post.</p>
Args:
space_id: <p>The unique ID of the private re:Post.</p>
accessor_ids: <p>The user or group accessor identifiers to add the role to.</p>
role: <p>The role to add to the users or groups.</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.
Examples:
BatchAddRole
>>> client.batch_add_role(space_id='SP1234567890abcdefghijkl', accessor_ids=['12345678-1234-1234-1234-1234567890ab'], role='EXPERT')
"""
def _handler(
req: "OperationRequest[capo_repostspace.types.batch_add_role_input.BatchAddRoleInput]",
) -> OperationResponse[
"capo_repostspace.types.batch_add_role_output.BatchAddRoleOutput"
]:
import capo_repostspace._operations.repost_space.batch_add_role
output, http_response = (
capo_repostspace._operations.repost_space.batch_add_role.batch_add_role(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("BatchAddRole")
)
input_: capo_repostspace.types.batch_add_role_input.BatchAddRoleInput = {
"space_id": space_id,
"accessor_ids": accessor_ids,
"role": role,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|