Skip to content

send_invites

send_invites(
    space_id: SpaceId,
    accessor_ids: AccessorIdList,
    title: InviteTitle,
    body: InviteBody,
    *,
    config_overrides: Optional[repostspaceClientConfig] = None,
) -> None

Sends an invitation email to selected users and groups.

Parameters:

  • space_id (SpaceId) –

    The ID of the private re:Post.

  • accessor_ids (AccessorIdList) –

    The array of identifiers for the users and groups.

  • title (InviteTitle) –

    The title of the invite.

  • body (InviteBody) –

    The body of the invite.

Raises:

Source code in docs_src/capo_repostspace/_services/repostspace.py
def send_invites(
    self,
    space_id: "capo_repostspace.types.space_id.SpaceId",
    accessor_ids: "capo_repostspace.types.accessor_id_list.AccessorIdList",
    title: "capo_repostspace.types.invite_title.InviteTitle",
    body: "capo_repostspace.types.invite_body.InviteBody",
    *,
    config_overrides: Optional[repostspaceClientConfig] = None,
) -> None:
    """<p>Sends an invitation email to selected users and groups.</p>

    Args:
        space_id: <p>The ID of the private re:Post.</p>
        accessor_ids: <p>The array of identifiers for the users and groups.</p>
        title: <p>The title of the invite.</p>
        body: <p>The body of the invite.</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.send_invites_input.SendInvitesInput]",
    ) -> OperationResponse[None]:
        import capo_repostspace._operations.repost_space.send_invites

        output, http_response = (
            capo_repostspace._operations.repost_space.send_invites.send_invites(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_repostspace.types.send_invites_input.SendInvitesInput",
    ) -> dict[str, Any]:
        import capo_repostspace.types.send_invites_input

        return capo_repostspace.types.send_invites_input.redact_sensitive(input_)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("SendInvites", redact_input=_redact_input),
    )
    input_: capo_repostspace.types.send_invites_input.SendInvitesInput = {
        "space_id": space_id,
        "accessor_ids": accessor_ids,
        "title": title,
        "body": body,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output