pub struct Teammates {
    pub client: Client,
}

Fields

client: Client

Implementations

Retrieve all teammates.

This function performs a GET to the /teammates endpoint.

This endpoint allows you to retrieve a list of all current Teammates.

You can limit the number of results returned using the limit query paramater. To return results from a specific Teammate, use the offset paramter. The Response Headers will include pagination info.

Parameters:

  • limit: u64 – Number of items to return.
  • offset: u64 – Paging offset.
  • on_behalf_of: &str – The license key provided with your New Relic account.

Invite teammate.

This function performs a POST to the /teammates endpoint.

This endpoint allows you to invite a Teammate to your account via email.

You can set a Teammate’s initial permissions using the scopes array in the request body. Teammate’s will receive a minimum set of scopes from Twilio SendGrid that are necessary for the Teammate to function.

Note: A teammate invite will expire after 7 days, but you may resend the invitation at any time to reset the expiration date.

Parameters:

  • on_behalf_of: &str – The license key provided with your New Relic account.

Resend teammate invite.

This function performs a POST to the /teammates/pending/{token}/resend endpoint.

This endpoint allows you to resend a Teammate invitation.

Teammate invitations will expire after 7 days. Resending an invitation will reset the expiration date.

Parameters:

  • on_behalf_of: &str – The license key provided with your New Relic account.

Retrieve access requests.

This function performs a GET to the /scopes/requests endpoint.

This endpoint allows you to retrieve a list of all recent access requests.

The Response Header’s link parameter will include pagination info.

Parameters:

  • limit: i64 – Optional field to limit the number of results returned.
  • offset: i64 – Optional beginning point in the list to retrieve from.

Retrieve access requests.

This function performs a GET to the /scopes/requests endpoint.

As opposed to get_scopes_requests, this function returns all the pages of the request at once.

This endpoint allows you to retrieve a list of all recent access requests.

The Response Header’s link parameter will include pagination info.

Retrieve all pending teammates.

This function performs a GET to the /teammates/pending endpoint.

This endpoint allows you to retrieve a list of all pending Teammate invitations.

Each teammate invitation is valid for 7 days. Users may resend the invitation to refresh the expiration date.

Parameters:

  • on_behalf_of: &str – The license key provided with your New Relic account.

Retrieve specific teammate.

This function performs a GET to the /teammates/{username} endpoint.

This endpoint allows you to retrieve a specific Teammate by username.

You can retrieve the username’s for each of your Teammates using the “Retrieve all Teammates” endpoint.

Parameters:

  • on_behalf_of: &str – The license key provided with your New Relic account.

Delete teammate.

This function performs a DELETE to the /teammates/{username} endpoint.

This endpoint allows you to delete a teammate.

Only the parent user or an admin teammate can delete another teammate.

Parameters:

  • on_behalf_of: &str – The license key provided with your New Relic account.

Update teammate’s permissions.

This function performs a PATCH to the /teammates/{username} endpoint.

This endpoint allows you to update a teammate’s permissions.

To turn a teammate into an admin, the request body should contain an is_admin set to true. Otherwise, set is_admin to false and pass in all the scopes that a teammate should have.

Only the parent user or other admin teammates can update another teammate’s permissions.

Admin users can only update permissions.

Parameters:

  • on_behalf_of: &str – The license key provided with your New Relic account.

Approve access request.

This function performs a PATCH to the /scopes/requests/{request_id}/approve endpoint.

This endpoint allows you to approve an access attempt.

Note: Only teammate admins may approve another teammate’s access request.

Deny access request.

This function performs a DELETE to the /scopes/requests/{request_id} endpoint.

This endpoint allows you to deny an attempt to access your account.

Note: Only teammate admins may delete a teammate’s access request.

Delete pending teammate.

This function performs a DELETE to the /teammates/pending/{token} endpoint.

This endpoint allows you to delete a pending teammate invite.

Parameters:

  • on_behalf_of: &str – The license key provided with your New Relic account.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Attaches the current Context to this type, returning a WithContext wrapper. Read more
Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more