pub struct Roles {
pub client: Client,
}
Fields§
§client: Client
Implementations§
source§impl Roles
impl Roles
sourcepub async fn get(&self) -> Result<Response<Domains>, ClientError>
pub async fn get(&self) -> Result<Response<Domains>, ClientError>
List roles.
This function performs a GET
to the /roles
endpoint.
List roles on your account
Scopes: role:read:admin
Rate Limit Label: Medium
Prerequisites :
- Pro or higher plan.
- For setting the initial role, you must be the Account Owner.
- For subsequent role management, you must be the Account Owner or user with role management permissions.
sourcepub async fn create(
&self,
body: &CreateRoleRequest
) -> Result<Response<()>, ClientError>
pub async fn create( &self, body: &CreateRoleRequest ) -> Result<Response<()>, ClientError>
Create a role.
This function performs a POST
to the /roles
endpoint.
Each Zoom user automatically has a role which can either be owner, administrator, or a member.
Pre-requisite:
- Pro or higher plan.
- For setting the initial role, you must be the Account Owner.
- For subsequent role management, you must be the Account Owner or user with role management permissions.
Scopes:role:write:admin
Rate Limit Label: Light
sourcepub async fn members(
&self,
role_id: &str,
page_count: &str,
page_number: i64,
next_page_token: &str,
page_size: i64
) -> Result<Response<Vec<Domains>>, ClientError>
pub async fn members( &self, role_id: &str, page_count: &str, page_number: i64, next_page_token: &str, page_size: i64 ) -> Result<Response<Vec<Domains>>, ClientError>
List members in a role.
This function performs a GET
to the /roles/{roleId}/members
endpoint.
User roles can have a set of permissions that allows access only to the pages a user needs to view or edit. Use this API to list all the members that are assigned a specific role.
Scope: role:read:admin
Rate Limit Label: Medium
Prerequisites:
- A Pro or a higher plan.
Parameters:
-
role_id: &str
– User’s first name. -
page_count: &str
– The number of pages returned for this request. -
page_number: i64
– Deprecated - This field has been deprecated and we will stop supporting it completely in a future release. Please use “next_page_token” for pagination instead of this field.The page number of the current page in the returned records.
-
next_page_token: &str
– The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceeds the current page size. The expiration period for this token is 15 minutes. -
page_size: i64
– The number of records returned within a single API call.
sourcepub async fn get_all_members(
&self,
role_id: &str,
page_count: &str
) -> Result<Response<Vec<Domains>>, ClientError>
pub async fn get_all_members( &self, role_id: &str, page_count: &str ) -> Result<Response<Vec<Domains>>, ClientError>
List members in a role.
This function performs a GET
to the /roles/{roleId}/members
endpoint.
As opposed to members
, this function returns all the pages of the request at once.
User roles can have a set of permissions that allows access only to the pages a user needs to view or edit. Use this API to list all the members that are assigned a specific role.
Scope: role:read:admin
Rate Limit Label: Medium
Prerequisites:
- A Pro or a higher plan.
sourcepub async fn add_members(
&self,
role_id: &str,
body: &AddRoleMembersRequest
) -> Result<Response<AddRoleMembersResponse>, ClientError>
pub async fn add_members( &self, role_id: &str, body: &AddRoleMembersRequest ) -> Result<Response<AddRoleMembersResponse>, ClientError>
Assign a role.
This function performs a POST
to the /roles/{roleId}/members
endpoint.
User roles can have a set of permissions that allows access only to the pages a user needs to view or edit. Use this API to assign a role to members.
Scopes: role:write:admin
Rate Limit Label: Medium
Prerequisites:
- A Pro or a higher plan.
Parameters:
role_id: &str
– User’s first name.
sourcepub async fn member_delete(
&self,
role_id: &str,
member_id: &str
) -> Result<Response<()>, ClientError>
pub async fn member_delete( &self, role_id: &str, member_id: &str ) -> Result<Response<()>, ClientError>
Unassign a role.
This function performs a DELETE
to the /roles/{roleId}/members/{memberId}
endpoint.
User roles can have a set of permissions that allows access only to the pages a user needs to view or edit. Use this API to unassign a user’s role.
Scope: role:write:admin
Rate Limit Label: Light
Prerequisites:
- A Pro or a higher plan.
Parameters:
role_id: &str
– User’s first name.member_id: &str
– User’s first name.
sourcepub async fn get_information(
&self,
role_id: &str
) -> Result<Response<GetRoleInformationResponse>, ClientError>
pub async fn get_information( &self, role_id: &str ) -> Result<Response<GetRoleInformationResponse>, ClientError>
Get role information.
This function performs a GET
to the /roles/{roleId}
endpoint.
Each Zoom user automatically has a role which can either be owner, administrator, or a member. Account Owners and users with edit privileges for Role management can add customized roles with a list of privileges.
Use this API to get information including specific privileges assigned to a role.
Pre-requisite:
- A Pro or higher plan.
- For role management and updates, you must be the Account Owner or user with role management permissions.
Scopes: role:read:admin
Rate Limit Label: Light
Parameters:
role_id: &str
– User’s first name.
sourcepub async fn delete(&self, role_id: &str) -> Result<Response<()>, ClientError>
pub async fn delete(&self, role_id: &str) -> Result<Response<()>, ClientError>
Delete a role.
This function performs a DELETE
to the /roles/{roleId}
endpoint.
Each Zoom user automatically has a role which can either be owner, administrator, or a member. Account Owners and users with edit privileges for Role management can add customized roles with a list.
Use this API to delete a role.
Pre-requisite:
- A Pro or higher plan.
- For role management and updates, you must be the Account Owner or user with role management permissions.
Scopes: role:write:admin
Rate Limit Label: Light
Parameters:
role_id: &str
– User’s first name.
sourcepub async fn update(
&self,
role_id: &str,
body: &UpdateRoleRequest
) -> Result<Response<()>, ClientError>
pub async fn update( &self, role_id: &str, body: &UpdateRoleRequest ) -> Result<Response<()>, ClientError>
Update role information.
This function performs a PATCH
to the /roles/{roleId}
endpoint.
Each Zoom user automatically has a role which can either be owner, administrator, or a member. Account Owners and users with edit privileges for Role management can add customized roles with a list.
Use this API to change the privileges, name and description of a specific role.
Pre-requisite:
- A Pro or higher plan.
- For role management and updates, you must be the Account Owner or user with role management permissions.
Scopes:role:write:admin
Rate Limit Label: Light
Parameters:
role_id: &str
– User’s first name.